mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
TableGen: AsmMatcher diagnostic when missing instruction mnemonic.
Previously, if an instruction definition was missing the mnemonic, the next line would just assert(). Issue a real diagnostic instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156263 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eb034f4af3
commit
8e27c96159
@ -825,6 +825,9 @@ void MatchableInfo::tokenizeAsmString(const AsmMatcherInfo &Info) {
|
||||
throw TGError(TheDef->getLoc(),
|
||||
"Instruction '" + TheDef->getName() + "' has no tokens");
|
||||
Mnemonic = AsmOperands[0].Token;
|
||||
if (Mnemonic.empty())
|
||||
throw TGError(TheDef->getLoc(),
|
||||
"Missing instruction mnemonic");
|
||||
// FIXME : Check and raise an error if it is a register.
|
||||
if (Mnemonic[0] == '$')
|
||||
throw TGError(TheDef->getLoc(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user