summaryrefslogtreecommitdiff
path: root/include/llvm/Support
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-09-27 21:09:25 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-09-27 21:09:25 +0000
commit8a93c3ab2121f8c9f0739971070b042cd6aa8024 (patch)
tree4179d68306128a02e730e1968e15fb973c62cd5e /include/llvm/Support
parenta6610ee882fcb8bcad60d53fc52b80f00a3fddae (diff)
downloadllvm-8a93c3ab2121f8c9f0739971070b042cd6aa8024.tar.gz
llvm-8a93c3ab2121f8c9f0739971070b042cd6aa8024.tar.bz2
llvm-8a93c3ab2121f8c9f0739971070b042cd6aa8024.tar.xz
Make SourceMgr::PrintMessage() testable and add unit tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191558 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/SourceMgr.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/Support/SourceMgr.h b/include/llvm/Support/SourceMgr.h
index 5b33d42f9e..dd4897432d 100644
--- a/include/llvm/Support/SourceMgr.h
+++ b/include/llvm/Support/SourceMgr.h
@@ -144,11 +144,17 @@ public:
///
/// @param ShowColors - Display colored messages if output is a terminal and
/// the default error handler is used.
- void PrintMessage(SMLoc Loc, DiagKind Kind, const Twine &Msg,
+ void PrintMessage(raw_ostream &OS, SMLoc Loc, DiagKind Kind,
+ const Twine &Msg,
ArrayRef<SMRange> Ranges = None,
ArrayRef<SMFixIt> FixIts = None,
bool ShowColors = true) const;
+ /// Emits a diagnostic to llvm::errs().
+ void PrintMessage(SMLoc Loc, DiagKind Kind, const Twine &Msg,
+ ArrayRef<SMRange> Ranges = None,
+ ArrayRef<SMFixIt> FixIts = None,
+ bool ShowColors = true) const;
/// GetMessage - Return an SMDiagnostic at the specified location with the
/// specified string.