mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Prevent ARM Assembler crashing on unrecognised assembly format for DSB instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159257 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7d85f87acb
commit
b69182095c
@ -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
Block a user