summaryrefslogtreecommitdiff
path: root/lld/Common/ErrorHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/Common/ErrorHandler.cpp')
-rw-r--r--lld/Common/ErrorHandler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/Common/ErrorHandler.cpp b/lld/Common/ErrorHandler.cpp
index 4cacd82c9f35..0a8fc8f054fc 100644
--- a/lld/Common/ErrorHandler.cpp
+++ b/lld/Common/ErrorHandler.cpp
@@ -242,6 +242,9 @@ void ErrorHandler::warn(const Twine &msg) {
return;
}
+ if (suppressWarnings)
+ return;
+
std::lock_guard<std::mutex> lock(mu);
reportDiagnostic(getLocation(msg), Colors::MAGENTA, "warning", msg);
sep = getSeparator(msg);