diff options
author | Chris Lattner <sabre@nondot.org> | 2009-06-21 21:22:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-06-21 21:22:11 +0000 |
commit | 14ee48a5bae352780b767a14bd97e8e91800a95b (patch) | |
tree | 5ff109bb82dfebe414bbd54f6a7cbe1a0e0e0f4c /tools/llvm-mc/AsmParser.cpp | |
parent | b0789ed5a45a90ee7ff398fcdc1383b49ee88918 (diff) |
rename SourceMgr::PrintError to PrintMessage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc/AsmParser.cpp')
-rw-r--r-- | tools/llvm-mc/AsmParser.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/llvm-mc/AsmParser.cpp b/tools/llvm-mc/AsmParser.cpp index 9c0b4abb07..1940d76189 100644 --- a/tools/llvm-mc/AsmParser.cpp +++ b/tools/llvm-mc/AsmParser.cpp @@ -16,6 +16,17 @@ #include "llvm/Support/raw_ostream.h" using namespace llvm; +bool AsmParser::Error(SMLoc L, const char *Msg) { + Lexer.PrintMessage(L, Msg); + return true; +} + +bool AsmParser::TokError(const char *Msg) { + Lexer.PrintMessage(Lexer.getLoc(), Msg); + return true; +} + + bool AsmParser::Run() { // Prime the lexer. Lexer.Lex(); @@ -34,8 +45,7 @@ bool AsmParser::Run() { bool AsmParser::ParseStatement() { switch (Lexer.getKind()) { default: - Lexer.PrintError(Lexer.getLoc(), "unexpected token at start of statement"); - return true; + return TokError("unexpected token at start of statement"); case asmtok::EndOfStatement: Lexer.Lex(); return false; |