fix a broke range check
authorChris Lattner <sabre@nondot.org>
Wed, 14 Sep 2005 21:04:12 +0000 (21:04 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 14 Sep 2005 21:04:12 +0000 (21:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23354 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/DAGISelEmitter.cpp

index 06875986c40dc169d44b48dd421a51eb8b9d2d54..0093e50f82184cf46fa8c5953fdb30ff34dc7717 100644 (file)
@@ -785,7 +785,7 @@ void DAGISelEmitter::ParseAndResolveInstructions() {
 
     // Check that all of the results occur first in the list.
     for (unsigned i = 0; i != NumResults; ++i) {
-      if (NumResults == CGI.OperandList.size())
+      if (i == CGI.OperandList.size())
         I->error("'" + InstResults.begin()->first +
                  "' set but does not appear in operand list!");