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

Andrew Kelley via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 09:34:11 PST 2018


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> 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/20180103/d5b020c1/attachment.html>


More information about the llvm-commits mailing list