mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-17 23:44:43 +00:00
Fix incorrect assert that should be a user error for code like 'mov $0, %%eax'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82054 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9ad29207db
commit
0d6cd00dbe
@ -241,7 +241,8 @@ bool X86ATTAsmParser::ParseRegister(X86Operand &Op) {
|
||||
getLexer().Lex(); // Eat percent token.
|
||||
|
||||
const AsmToken &Tok = getLexer().getTok();
|
||||
assert(TokPercent.is(AsmToken::Identifier) && "Invalid token kind!");
|
||||
if (Tok.isNot(AsmToken::Identifier))
|
||||
return Error(Tok.getLoc(), "invalid register name");
|
||||
|
||||
// FIXME: Validate register for the current architecture; we have to do
|
||||
// validation later, so maybe there is no need for this here.
|
||||
|
Loading…
x
Reference in New Issue
Block a user