From 5c4c774c75926402b746b14ba73f01572e464ebb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 25 Mar 2006 22:12:44 +0000 Subject: [PATCH] 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 --- utils/TableGen/DAGISelEmitter.cpp | 3 +++ 1 file changed, 3 insertions(+) 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(); -- 2.34.1