From: Jim Grosbach Date: Wed, 19 Jan 2011 23:06:07 +0000 (+0000) Subject: Make sure to propogate the error code when we fail to parse a modifier. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4121e8a0bd56a63e2d5186d99b62c7bd6afc9b5d;p=oota-llvm.git 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 --- diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index 9105ad5146b..0b0df0285d9 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -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 + "'"); } }