forked from OSchip/llvm-project
Prevent ARM Assembler crashing on unrecognised assembly format for DSB instruction
llvm-svn: 159257
This commit is contained in:
parent
38179d9693
commit
4b7558ef9a
|
@ -3256,7 +3256,8 @@ ARMAsmParser::OperandMatchResultTy ARMAsmParser::
|
|||
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()))
|
||||
|
|
Loading…
Reference in New Issue