mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-25 21:33:25 +00:00
[Support] Fix prefix logic in WithColor.
When a prefix is passed, we need to print a colon a space after it, not just the prefix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330535 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c215743929
commit
e375d515ff
@ -66,17 +66,20 @@ raw_ostream &WithColor::warning() { return warning(errs()); }
|
||||
raw_ostream &WithColor::note() { return note(errs()); }
|
||||
|
||||
raw_ostream &WithColor::error(raw_ostream &OS, StringRef Prefix) {
|
||||
OS << Prefix;
|
||||
if (!Prefix.empty())
|
||||
OS << Prefix << ": ";
|
||||
return WithColor(OS, HighlightColor::Error).get() << "error: ";
|
||||
}
|
||||
|
||||
raw_ostream &WithColor::warning(raw_ostream &OS, StringRef Prefix) {
|
||||
OS << Prefix;
|
||||
if (!Prefix.empty())
|
||||
OS << Prefix << ": ";
|
||||
return WithColor(OS, HighlightColor::Warning).get() << "warning: ";
|
||||
}
|
||||
|
||||
raw_ostream &WithColor::note(raw_ostream &OS, StringRef Prefix) {
|
||||
OS << Prefix;
|
||||
if (!Prefix.empty())
|
||||
OS << Prefix << ": ";
|
||||
return WithColor(OS, HighlightColor::Note).get() << "note: ";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user