return;
}
+ if (suppressWarnings)
+ return;
+
std::lock_guard<std::mutex> lock(mu);
reportDiagnostic(getLocation(msg), Colors::MAGENTA, "warning", msg);
sep = getSeparator(msg);
// Handle -fatal_warnings early since it converts missing argument warnings
// to errors.
errorHandler().fatalWarnings = args.hasArg(OPT_fatal_warnings);
+ errorHandler().suppressWarnings = args.hasArg(OPT_w);
if (missingCount)
error(Twine(args.getArgString(missingIndex)) + ": missing argument");
Group<grp_rare>;
def w : Flag<["-"], "w">,
HelpText<"Suppress all warnings">,
- Flags<[HelpHidden]>,
Group<grp_rare>;
def final_output : Separate<["-"], "final_output">,
MetaVarName<"<name>">,
StringRef logName = "lld";
bool exitEarly = true;
bool fatalWarnings = false;
+ bool suppressWarnings = false;
bool verbose = false;
bool vsDiagnostics = false;
bool disableOutput = false;
# RUN: not %no-fatal-warnings-lld %t1.o -fatal_warnings -o /dev/null \
# RUN: -single_module 2>&1 | FileCheck -check-prefix=ERROR %s
+# RUN: %no-fatal-warnings-lld %t1.o -w -o /dev/null -single_module 2>&1 \
+# RUN: | count 0
+# RUN: not %no-fatal-warnings-lld %t1.o -fatal_warnings -w -o /dev/null \
+# RUN: -single_module 2>&1 \
+# RUN: | FileCheck --check-prefix=ERROR %s
+
# ERROR: error: Option `-single_module' is deprecated
# WARNING: warning: Option `-single_module' is deprecated