[PATCH] ldd::COFF: initalize ErrorHandler with CanExitEarly value

Andrew Kelley via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 20:48:41 PST 2018


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.

diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index 0e7db7b6ae3..df1ce324055 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -57,6 +57,7 @@ bool link(ArrayRef<const char *> Args, bool CanExitEarly,
raw_ostream &Diag) {
   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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180102/99f9e49b/attachment.html>


More information about the llvm-commits mailing list