llvm.org GIT mirror llvm / a562dc7
TableGen: Convert an assert() to a proper diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163726 91177308-0d34-0410-b5e6-96231b3b80d8 Jim Grosbach 7 years ago
1 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
10191019 throw TGError(Rec->getLoc(), "register class has no class info!");
10201020 }
10211021
1022 assert(Rec->isSubClassOf("Operand") && "Unexpected operand!");
1022 if (!Rec->isSubClassOf("Operand"))
1023 throw TGError(Rec->getLoc(), "Operand `" + Rec->getName() +
1024 "' does not derive from class Operand!\n");
10231025 Record *MatchClass = Rec->getValueAsDef("ParserMatchClass");
10241026 if (ClassInfo *CI = AsmOperandClasses[MatchClass])
10251027 return CI;