summaryrefslogtreecommitdiffstats
path: root/lld/ELF/DriverUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/DriverUtils.cpp')
-rw-r--r--lld/ELF/DriverUtils.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lld/ELF/DriverUtils.cpp b/lld/ELF/DriverUtils.cpp
index 87f0aa2a982..2f35c12d351 100644
--- a/lld/ELF/DriverUtils.cpp
+++ b/lld/ELF/DriverUtils.cpp
@@ -58,16 +58,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