mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-27 15:02:16 +00:00
TableGen: Convert an assert() to a proper diagnostic.
llvm-svn: 163726
This commit is contained in:
parent
9949a09bfb
commit
adfdb46f2c
@ -1020,7 +1020,9 @@ AsmMatcherInfo::getOperandClass(Record *Rec, int SubOpIdx) {
|
||||
throw TGError(Rec->getLoc(), "register class has no class info!");
|
||||
}
|
||||
|
||||
assert(Rec->isSubClassOf("Operand") && "Unexpected operand!");
|
||||
if (!Rec->isSubClassOf("Operand"))
|
||||
throw TGError(Rec->getLoc(), "Operand `" + Rec->getName() +
|
||||
"' does not derive from class Operand!\n");
|
||||
Record *MatchClass = Rec->getValueAsDef("ParserMatchClass");
|
||||
if (ClassInfo *CI = AsmOperandClasses[MatchClass])
|
||||
return CI;
|
||||
|
Loading…
x
Reference in New Issue
Block a user