diff options
Diffstat (limited to 'lld/COFF/Error.cpp')
-rw-r--r-- | lld/COFF/Error.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lld/COFF/Error.cpp b/lld/COFF/Error.cpp index 34abc280f6b..550d9b96967 100644 --- a/lld/COFF/Error.cpp +++ b/lld/COFF/Error.cpp @@ -32,7 +32,7 @@ namespace coff { uint64_t ErrorCount; raw_ostream *ErrorOS; -static LLVM_ATTRIBUTE_NORETURN void exitLld(int Val) { +LLVM_ATTRIBUTE_NORETURN void exitLld(int Val) { // Dealloc/destroy ManagedStatic variables before calling // _exit(). In a non-LTO build, this is a nop. In an LTO // build allows us to get the output of -time-passes. @@ -78,7 +78,8 @@ void error(const Twine &Msg) { print("error: ", raw_ostream::RED); *ErrorOS << "too many errors emitted, stopping now" << " (use /ERRORLIMIT:0 to see all errors)\n"; - exitLld(1); + if (Config->CanExitEarly) + exitLld(1); } ++ErrorCount; |