forked from OSchip/llvm-project
To avoid printing out multiple error messages for cases like:
.long 80+08 go ahead and assume that if we've got an Error token that we handled it already. Otherwise if it's a token we can't handle then go ahead and return the default error. llvm-svn: 129322
This commit is contained in:
parent
507992e909
commit
104af0619e
|
@ -539,6 +539,9 @@ bool AsmParser::ParsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) {
|
|||
switch (Lexer.getKind()) {
|
||||
default:
|
||||
return TokError("unknown token in expression");
|
||||
// If we have an error assume that we've already handled it.
|
||||
case AsmToken::Error:
|
||||
return true;
|
||||
case AsmToken::Exclaim:
|
||||
Lex(); // Eat the operator.
|
||||
if (ParsePrimaryExpr(Res, EndLoc))
|
||||
|
|
Loading…
Reference in New Issue