Force color diagnostics when using the driver from the command line.

Previously, the frontend detected that its output was being piped into the
driver and buffered, and decided that that wasn't a color-friendly output
stream. Now, the driver passes -color-diagnostics to the frontend to force
color output if the driver itself is in a color-output context.

<rdar://problem/16697713>

Swift SVN r18506
This commit is contained in:
Jordan Rose
2014-05-21 19:45:47 +00:00
parent e6db58a6ae
commit 7cd4341cd6
8 changed files with 67 additions and 2 deletions

View File

@@ -645,6 +645,7 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
Opts.SkipDiagnosticPasses |= Args.hasArg(OPT_disable_diagnostic_passes);
Opts.ShowDiagnosticsAfterFatalError |=
Args.hasArg(OPT_show_diagnostics_after_fatal);
Opts.UseColor |= Args.hasArg(OPT_color_diagnostics);
return false;
}