summaryrefslogtreecommitdiffstats
path: root/lld/COFF/DriverUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/COFF/DriverUtils.cpp')
-rw-r--r--lld/COFF/DriverUtils.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lld/COFF/DriverUtils.cpp b/lld/COFF/DriverUtils.cpp
index 4360ac23b26..67266217dee 100644
--- a/lld/COFF/DriverUtils.cpp
+++ b/lld/COFF/DriverUtils.cpp
@@ -756,16 +756,17 @@ static void handleColorDiagnostics(opt::InputArgList &args) {
OPT_no_color_diagnostics);
if (!arg)
return;
+
if (arg->getOption().getID() == OPT_color_diagnostics) {
- errorHandler().colorDiagnostics = true;
+ errorHandler().errorOS->enable_colors();
} else if (arg->getOption().getID() == OPT_no_color_diagnostics) {
- errorHandler().colorDiagnostics = false;
+ errorHandler().errorOS->disable_colors();
} else {
StringRef s = arg->getValue();
if (s == "always")
- errorHandler().colorDiagnostics = true;
+ errorHandler().errorOS->enable_colors();
else if (s == "never")
- errorHandler().colorDiagnostics = false;
+ errorHandler().errorOS->disable_colors();
else if (s != "auto")
error("unknown option: --color-diagnostics=" + s);
}
OpenPOWER on IntegriCloud