[lld] r321983 - [COFF] Initalize ErrorHandler with CanExitEarly value

Shoaib Meenai via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 7 21:58:36 PST 2018


Author: smeenai
Date: Sun Jan  7 21:58:36 2018
New Revision: 321983

URL: http://llvm.org/viewvc/llvm-project?rev=321983&view=rev
Log:
[COFF] Initalize ErrorHandler with CanExitEarly value

Previously, the COFF driver would call exit(1) from the
ErrorHandler in the case of a link error, even if
CanExitEarly=false was specified. Now it initializes
the ErrorHandler in the same way that the ELF driver does.

Patch by Andrew Kelley.

Differential Revision: https://reviews.llvm.org/D41803

Modified:
    lld/trunk/COFF/Driver.cpp

Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=321983&r1=321982&r2=321983&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Sun Jan  7 21:58:36 2018
@@ -57,6 +57,7 @@ bool link(ArrayRef<const char *> Args, b
   errorHandler().ErrorLimitExceededMsg =
       "too many errors emitted, stopping now"
       " (use /ERRORLIMIT:0 to see all errors)";
+  errorHandler().ExitEarly = CanExitEarly;
   Config = make<Configuration>();
   Config->Argv = {Args.begin(), Args.end()};
   Config->CanExitEarly = CanExitEarly;




More information about the llvm-commits mailing list