diff options
author | Eric Christopher <echristo@apple.com> | 2011-04-12 00:03:13 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-04-12 00:03:13 +0000 |
commit | f3755b2d0e7aa8e849f6ec6f95584cadb1412135 (patch) | |
tree | cf91dcec3d18ec972086c35a2e96e9d4f2ec2986 /lib | |
parent | 560ab9ebf78532df11188770c916c4eb6dcce1b2 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MC/MCParser/AsmParser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index 8af4ac62e2..418b510151 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -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)) |