mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
Modified MCAsmLexer to return error information upward
rather than printing it locally, reducing its dependence on SourceMgr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94041 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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() {
|
||||
|
Reference in New Issue
Block a user