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

Shoaib Meenai via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 23:37:42 PST 2018


+Rui and Hans, in case they miss it on the list.

(Side note: it's much easier to keep track of patches on Phabricator IMO.)

From: llvm-commits <llvm-commits-bounces at lists.llvm.org> on behalf of Andrew Kelley via llvm-commits <llvm-commits at lists.llvm.org>
Reply-To: Andrew Kelley <superjoe30 at gmail.com>
Date: Wednesday, January 3, 2018 at 10:51 PM
To: llvm-commits <llvm-commits at lists.llvm.org>
Subject: Re: [PATCH] ldd::COFF: initalize ErrorHandler with CanExitEarly value

I would also like to request that this is backported to the release_60 branch.

On Tue, Jan 2, 2018 at 11:48 PM, Andrew Kelley <superjoe30 at gmail.com<mailto:superjoe30 at gmail.com>> wrote:
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/20180104/f74835dd/attachment.html>


More information about the llvm-commits mailing list