From: Craig Topper Date: Tue, 9 Oct 2012 04:55:28 +0000 (+0000) Subject: In parseMSRMaskOperand, add an explicit check for the operand being an identifier... X-Git-Tag: android-x86-6.0-r1~179^2~2658 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=102b8ccfe673b4e3aa189f85b0fa06f59f19a199;p=android-x86%2Fexternal-llvm.git In parseMSRMaskOperand, add an explicit check for the operand being an identifier instead of just having an assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165480 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 00f0f74067d..93e5eca6252 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -3372,7 +3372,8 @@ ARMAsmParser::OperandMatchResultTy ARMAsmParser:: parseMSRMaskOperand(SmallVectorImpl &Operands) { SMLoc S = Parser.getTok().getLoc(); const AsmToken &Tok = Parser.getTok(); - assert(Tok.is(AsmToken::Identifier) && "Token is not an Identifier"); + if (!Tok.is(AsmToken::Identifier)) + return MatchOperand_NoMatch; StringRef Mask = Tok.getString(); if (isMClass()) {