projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Modified MCAsmLexer to return error information upward
[oota-llvm.git]
/
tools
/
llvm-mc
/
AsmParser.cpp
diff --git
a/tools/llvm-mc/AsmParser.cpp
b/tools/llvm-mc/AsmParser.cpp
index ab37eb838300ce9018f5e0dc8fab346f5f88806a..eb77e8d395bd7f77874611425d50bc855488d45f 100644
(file)
--- a/
tools/llvm-mc/AsmParser.cpp
+++ b/
tools/llvm-mc/AsmParser.cpp
@@
-101,7
+101,12
@@
bool AsmParser::TokError(const char *Msg) {
}
const AsmToken &AsmParser::Lex() {
- return Lexer.Lex();
+ const AsmToken &tok = Lexer.Lex();
+
+ if (tok.is(AsmToken::Error))
+ Lexer.PrintMessage(Lexer.getErrLoc(), Lexer.getErr(), "error");
+
+ return tok;
}
bool AsmParser::Run() {