Add a missing check which cause an invalid .td file to crash tblgen

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27126 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-03-25 22:12:44 +00:00
parent 98509ef3c7
commit 5c4c774c75

View File

@ -1342,6 +1342,9 @@ void DAGISelEmitter::ParseInstructions() {
// Check that it exists in InstResults.
TreePatternNode *RNode = InstResults[OpName];
if (RNode == 0)
I->error("Operand $" + OpName + " does not exist in operand list!");
if (i == 0)
Res0Node = RNode;
Record *R = dynamic_cast<DefInit*>(RNode->getLeafValue())->getDef();