diff options
| author | Rui Ueyama <ruiu@google.com> | 2019-08-02 07:22:34 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2019-08-02 07:22:34 +0000 |
| commit | 4d41c332ef57281973e5e73295a56132ae12df77 (patch) | |
| tree | 2fd94fb54c00a1233ce74978d3148d250bca01cd /clang/lib/Frontend | |
| parent | 206fe82be410ff8cc7619c89afdff6561275a015 (diff) | |
| download | bcm5719-llvm-4d41c332ef57281973e5e73295a56132ae12df77.tar.gz bcm5719-llvm-4d41c332ef57281973e5e73295a56132ae12df77.zip | |
Revert r367649: Improve raw_ostream so that you can "write" colors using operator<<
This reverts commit r367649 in an attempt to unbreak Windows bots.
llvm-svn: 367658
Diffstat (limited to 'clang/lib/Frontend')
| -rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 4 | ||||
| -rw-r--r-- | clang/lib/Frontend/TextDiagnostic.cpp | 25 |
2 files changed, 16 insertions, 13 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index d9bbe253810..6bf4fbcbb21 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1491,10 +1491,6 @@ bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args, OPT_fno_diagnostics_show_option, DefaultShowOpt); llvm::sys::Process::UseANSIEscapeCodes(Args.hasArg(OPT_fansi_escape_codes)); - if (Opts.ShowColors) { - llvm::outs().enable_colors(); - llvm::errs().enable_colors(); - } // Default behavior is to not to show note include stacks. Opts.ShowNoteIncludeStack = false; diff --git a/clang/lib/Frontend/TextDiagnostic.cpp b/clang/lib/Frontend/TextDiagnostic.cpp index d066ce06715..d6e75a9180c 100644 --- a/clang/lib/Frontend/TextDiagnostic.cpp +++ b/clang/lib/Frontend/TextDiagnostic.cpp @@ -23,16 +23,23 @@ using namespace clang; -static const raw_ostream::Color noteColor = raw_ostream::BLACK; -static const raw_ostream::Color remarkColor = raw_ostream::BLUE; -static const raw_ostream::Color fixitColor = raw_ostream::GREEN; -static const raw_ostream::Color caretColor = raw_ostream::GREEN; -static const raw_ostream::Color warningColor = raw_ostream::MAGENTA; -static const raw_ostream::Color templateColor = raw_ostream::CYAN; -static const raw_ostream::Color errorColor = raw_ostream::RED; -static const raw_ostream::Color fatalColor = raw_ostream::RED; +static const enum raw_ostream::Colors noteColor = + raw_ostream::BLACK; +static const enum raw_ostream::Colors remarkColor = + raw_ostream::BLUE; +static const enum raw_ostream::Colors fixitColor = + raw_ostream::GREEN; +static const enum raw_ostream::Colors caretColor = + raw_ostream::GREEN; +static const enum raw_ostream::Colors warningColor = + raw_ostream::MAGENTA; +static const enum raw_ostream::Colors templateColor = + raw_ostream::CYAN; +static const enum raw_ostream::Colors errorColor = raw_ostream::RED; +static const enum raw_ostream::Colors fatalColor = raw_ostream::RED; // Used for changing only the bold attribute. -static const raw_ostream::Color savedColor = raw_ostream::SAVEDCOLOR; +static const enum raw_ostream::Colors savedColor = + raw_ostream::SAVEDCOLOR; /// Add highlights to differences in template strings. static void applyTemplateHighlighting(raw_ostream &OS, StringRef Str, |

