From: Chris Lattner Date: Sat, 25 Mar 2006 22:12:44 +0000 (+0000) Subject: Add a missing check which cause an invalid .td file to crash tblgen X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5c4c774c75926402b746b14ba73f01572e464ebb;p=oota-llvm.git 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 --- diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index 81a45e1d85e..e9d5c421423 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -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(RNode->getLeafValue())->getDef();