Do not print out ARGV0 in white because it's unreadable on white background.

llvm-svn: 287950
This commit is contained in:
Rui Ueyama 2016-11-25 20:37:16 +00:00
parent 8c8818a58c
commit c01321c6b8
1 changed files with 2 additions and 3 deletions

View File

@ -43,14 +43,13 @@ static bool useColor() {
}
static void print(StringRef S, raw_ostream::Colors C) {
*ErrorOS << Argv0 + ": ";
if (useColor()) {
ErrorOS->changeColor(raw_ostream::WHITE, /*Bold=*/true);
*ErrorOS << Argv0 + ": ";
ErrorOS->changeColor(C, true);
*ErrorOS << S;
ErrorOS->resetColor();
} else {
*ErrorOS << Argv0 + ": " << S;
*ErrorOS << S;
}
}