summaryrefslogtreecommitdiffstats
path: root/llvm/tools/dsymutil/ErrorReporting.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/dsymutil/ErrorReporting.h')
-rw-r--r--llvm/tools/dsymutil/ErrorReporting.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/llvm/tools/dsymutil/ErrorReporting.h b/llvm/tools/dsymutil/ErrorReporting.h
new file mode 100644
index 00000000000..a22adc8ab44
--- /dev/null
+++ b/llvm/tools/dsymutil/ErrorReporting.h
@@ -0,0 +1,33 @@
+//===- ErrorReporting.h - dsymutil error reporting -------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TOOLS_DSYMUTIL_ERRORREPORTING_H
+#define LLVM_TOOLS_DSYMUTIL_ERRORREPORTING_H
+#include "llvm/Support/WithColor.h"
+#include "llvm/Support/raw_ostream.h"
+
+namespace llvm {
+namespace dsymutil {
+
+inline raw_ostream &error_ostream() {
+ return WithColor(errs(), HighlightColor::Error).get() << "error: ";
+}
+
+inline raw_ostream &warn_ostream() {
+ return WithColor(errs(), HighlightColor::Warning).get() << "warning: ";
+}
+
+inline raw_ostream &note_ostream() {
+ return WithColor(errs(), HighlightColor::Note).get() << "note: ";
+}
+
+} // namespace dsymutil
+} // end namespace llvm
+
+#endif // LLVM_TOOLS_DSYMUTIL_ERRORREPORTING_H
OpenPOWER on IntegriCloud