[llvm-commits] [llvm] r165480 - /llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp

Craig Topper craig.topper at gmail.com
Mon Oct 8 21:55:28 PDT 2012


Author: ctopper
Date: Mon Oct  8 23:55:28 2012
New Revision: 165480

URL: http://llvm.org/viewvc/llvm-project?rev=165480&view=rev
Log:
In parseMSRMaskOperand, add an explicit check for the operand being an identifier instead of just having an assert.

Modified:
    llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp

Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=165480&r1=165479&r2=165480&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Oct  8 23:55:28 2012
@@ -3372,7 +3372,8 @@
 parseMSRMaskOperand(SmallVectorImpl<MCParsedAsmOperand*> &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()) {





More information about the llvm-commits mailing list