[llvm-commits] [llvm] r159257 - /llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Richard Barton
richard.barton at arm.com
Wed Jun 27 02:36:19 PDT 2012
Author: rbarton
Date: Wed Jun 27 04:36:19 2012
New Revision: 159257
URL: http://llvm.org/viewvc/llvm-project?rev=159257&view=rev
Log:
Prevent ARM Assembler crashing on unrecognised assembly format for DSB instruction
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=159257&r1=159256&r2=159257&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Wed Jun 27 04:36:19 2012
@@ -3256,7 +3256,8 @@
parseMemBarrierOptOperand(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 OptStr = Tok.getString();
unsigned Opt = StringSwitch<unsigned>(OptStr.slice(0, OptStr.size()))
More information about the llvm-commits
mailing list