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 /tools/llvm-mc/AsmLexer.cpp | |
parent | 2bc29dc0bcb3c1441477a062e4a5cffff175c8ca (diff) | |
download | external_llvm-3fb7683bec8c8edb24e80c95f3b0668c6ecc0ae6.zip external_llvm-3fb7683bec8c8edb24e80c95f3b0668c6ecc0ae6.tar.gz external_llvm-3fb7683bec8c8edb24e80c95f3b0668c6ecc0ae6.tar.bz2 |
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 'tools/llvm-mc/AsmLexer.cpp')
-rw-r--r-- | tools/llvm-mc/AsmLexer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/llvm-mc/AsmLexer.cpp b/tools/llvm-mc/AsmLexer.cpp index 931f3b2..7b744fb 100644 --- a/tools/llvm-mc/AsmLexer.cpp +++ b/tools/llvm-mc/AsmLexer.cpp @@ -42,14 +42,15 @@ SMLoc AsmLexer::getLoc() const { return SMLoc::getFromPointer(TokStart); } -void AsmLexer::PrintMessage(SMLoc Loc, const std::string &Msg) const { - SrcMgr.PrintMessage(Loc, Msg); +void AsmLexer::PrintMessage(SMLoc Loc, const std::string &Msg, + const char *Type) const { + SrcMgr.PrintMessage(Loc, Msg, Type); } /// ReturnError - Set the error to the specified string at the specified /// location. This is defined to always return asmtok::Error. asmtok::TokKind AsmLexer::ReturnError(const char *Loc, const std::string &Msg) { - SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), Msg); + SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), Msg, "error"); return asmtok::Error; } |