Make sure to propogate the error code when we fail to parse a modifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123857 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2011-01-19 23:06:07 +00:00
parent dacde944bd
commit 4121e8a0bd

View File

@ -523,7 +523,7 @@ bool AsmParser::ParsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) {
Variant = MCSymbolRefExpr::getVariantKindForName(Split.second);
if (Variant == MCSymbolRefExpr::VK_Invalid) {
Variant = MCSymbolRefExpr::VK_None;
TokError("invalid variant '" + Split.second + "'");
return TokError("invalid variant '" + Split.second + "'");
}
}