mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-14 04:57:33 +00:00
Replace an assert() with an actual diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145535 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
af65a8c54b
commit
4a2242cea0
@ -737,7 +737,9 @@ void MatchableInfo::TokenizeAsmString(const AsmMatcherInfo &Info) {
|
|||||||
|
|
||||||
// The first token of the instruction is the mnemonic, which must be a
|
// The first token of the instruction is the mnemonic, which must be a
|
||||||
// simple string, not a $foo variable or a singleton register.
|
// simple string, not a $foo variable or a singleton register.
|
||||||
assert(!AsmOperands.empty() && "Instruction has no tokens?");
|
if (AsmOperands.empty())
|
||||||
|
throw TGError(TheDef->getLoc(),
|
||||||
|
"Instruction '" + TheDef->getName() + "' has no tokens");
|
||||||
Mnemonic = AsmOperands[0].Token;
|
Mnemonic = AsmOperands[0].Token;
|
||||||
if (Mnemonic[0] == '$' || getSingletonRegisterForAsmOperand(0, Info))
|
if (Mnemonic[0] == '$' || getSingletonRegisterForAsmOperand(0, Info))
|
||||||
throw TGError(TheDef->getLoc(),
|
throw TGError(TheDef->getLoc(),
|
||||||
|
Loading…
Reference in New Issue
Block a user