diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-30 00:49:23 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-30 00:49:23 +0000 |
commit | 3fb7683bec8c8edb24e80c95f3b0668c6ecc0ae6 (patch) | |
tree | 814b198e69a8c9b1b21c8f1281d501e7a01adde0 /include/llvm/Support/SourceMgr.h | |
parent | 2bc29dc0bcb3c1441477a062e4a5cffff175c8ca (diff) |
Normalize SourceMgr messages.
- Don't print "Parsing" in front of every message.
- Take additional "type" argument which is prepended to the message (with ": ")
if given.
- Update clients to print errors (warnings) as:
<filename>:<line number>: error(warning): ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/SourceMgr.h')
-rw-r--r-- | include/llvm/Support/SourceMgr.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Support/SourceMgr.h b/include/llvm/Support/SourceMgr.h index 4170c8d6dc..23044a8bd0 100644 --- a/include/llvm/Support/SourceMgr.h +++ b/include/llvm/Support/SourceMgr.h @@ -111,7 +111,10 @@ public: /// PrintMessage - Emit a message about the specified location with the /// specified string. - void PrintMessage(SMLoc Loc, const std::string &Msg) const; + /// + /// @param Type - If non-null, the kind of message (e.g., "error") which is + /// prefixed to the message. + void PrintMessage(SMLoc Loc, const std::string &Msg, const char *Type) const; private: void PrintIncludeStack(SMLoc IncludeLoc) const; |