diff options
Diffstat (limited to 'lld/Common/ErrorHandler.cpp')
-rw-r--r-- | lld/Common/ErrorHandler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/Common/ErrorHandler.cpp b/lld/Common/ErrorHandler.cpp index c87c0609b26..983962db579 100644 --- a/lld/Common/ErrorHandler.cpp +++ b/lld/Common/ErrorHandler.cpp @@ -157,12 +157,13 @@ void ErrorHandler::warn(const Twine &msg) { void ErrorHandler::error(const Twine &msg) { std::lock_guard<std::mutex> lock(mu); - newline(errorOS, msg); if (errorLimit == 0 || errorCount < errorLimit) { + newline(errorOS, msg); printHeader("error: ", raw_ostream::RED, msg); *errorOS << msg << "\n"; } else if (errorCount == errorLimit) { + newline(errorOS, msg); printHeader("error: ", raw_ostream::RED, msg); *errorOS << errorLimitExceededMsg << "\n"; if (exitEarly) |