summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/WithColor.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Support/WithColor.cpp b/llvm/lib/Support/WithColor.cpp
index 5a1364ff3cb..c3ab35bd891 100644
--- a/llvm/lib/Support/WithColor.cpp
+++ b/llvm/lib/Support/WithColor.cpp
@@ -65,15 +65,18 @@ raw_ostream &WithColor::warning() { return warning(errs()); }
raw_ostream &WithColor::note() { return note(errs()); }
-raw_ostream &WithColor::error(raw_ostream &OS) {
+raw_ostream &WithColor::error(raw_ostream &OS, StringRef Prefix) {
+ OS << Prefix;
return WithColor(OS, HighlightColor::Error).get() << "error: ";
}
-raw_ostream &WithColor::warning(raw_ostream &OS) {
+raw_ostream &WithColor::warning(raw_ostream &OS, StringRef Prefix) {
+ OS << Prefix;
return WithColor(OS, HighlightColor::Warning).get() << "warning: ";
}
-raw_ostream &WithColor::note(raw_ostream &OS) {
+raw_ostream &WithColor::note(raw_ostream &OS, StringRef Prefix) {
+ OS << Prefix;
return WithColor(OS, HighlightColor::Note).get() << "note: ";
}
OpenPOWER on IntegriCloud