summaryrefslogtreecommitdiffstats
path: root/llvm/tools/dsymutil/ErrorReporting.h
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-04-14 21:36:42 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-04-14 21:36:42 +0000
commit3072b130b2e2bd471d66933ac3eb0b497a0867d7 (patch)
tree1305fbb7e5bb7b3498830d0161a21eb219f7f279 /llvm/tools/dsymutil/ErrorReporting.h
parentf08da81de0fabf510dbcaa1aba781deda56548a4 (diff)
downloadbcm5719-llvm-3072b130b2e2bd471d66933ac3eb0b497a0867d7.tar.gz
bcm5719-llvm-3072b130b2e2bd471d66933ac3eb0b497a0867d7.zip
[Support] Add convenience functions to WithColor. NFC.
Create convenience functions for printing error, warning and note to stdout. Previously we had similar functions being used in dsymutil, but given that this pattern is so common it makes sense to make it available globally. llvm-svn: 330091
Diffstat (limited to 'llvm/tools/dsymutil/ErrorReporting.h')
-rw-r--r--llvm/tools/dsymutil/ErrorReporting.h33
1 files changed, 0 insertions, 33 deletions
diff --git a/llvm/tools/dsymutil/ErrorReporting.h b/llvm/tools/dsymutil/ErrorReporting.h
deleted file mode 100644
index a22adc8ab44..00000000000
--- a/llvm/tools/dsymutil/ErrorReporting.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//===- 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