mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Replace an assert() with an actual diagnostic.
llvm-svn: 145535
This commit is contained in:
parent
aa616ec887
commit
5c613a4c40
@ -737,7 +737,9 @@ void MatchableInfo::TokenizeAsmString(const AsmMatcherInfo &Info) {
|
||||
|
||||
// The first token of the instruction is the mnemonic, which must be a
|
||||
// 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;
|
||||
if (Mnemonic[0] == '$' || getSingletonRegisterForAsmOperand(0, Info))
|
||||
throw TGError(TheDef->getLoc(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user