The assert() should reference to machine instr operand number, too.
authorJim Grosbach <grosbach@apple.com>
Mon, 11 Oct 2010 21:41:31 +0000 (21:41 +0000)
committerJim Grosbach <grosbach@apple.com>
Mon, 11 Oct 2010 21:41:31 +0000 (21:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116243 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeEmitterGen.cpp

index 13eea6be0901bb63c485be300266e103664933f4..64ea16e362d9b387593708bc4383e2bb52fd166b 100644 (file)
@@ -160,10 +160,10 @@ void CodeEmitterGen::run(raw_ostream &o) {
               // order.
               unsigned OpIdx;
               if (CGI.hasOperandNamed(VarName, OpIdx)) {
-                assert (!CGI.isFlatOperandNotEmitted(OpIdx) &&
-                        "Explicitly used operand also marked as not emitted!");
                 // Get the machine operand number for the indicated operand.
                 OpIdx = CGI.OperandList[OpIdx].MIOperandNo;
+                assert (!CGI.isFlatOperandNotEmitted(OpIdx) &&
+                        "Explicitly used operand also marked as not emitted!");
               } else {
                 /// If this operand is not supposed to be emitted by the
                 /// generated emitter, skip it.