[llvm] r192709 - Guard the debug temp variable with NDEBUG to avoid warning/error with NDEBUG defined.

Pekka Jaaskelainen pekka.jaaskelainen at tut.fi
Tue Oct 15 07:40:46 PDT 2013


Author: pjaaskel
Date: Tue Oct 15 09:40:46 2013
New Revision: 192709

URL: http://llvm.org/viewvc/llvm-project?rev=192709&view=rev
Log:
Guard the debug temp variable with NDEBUG to avoid warning/error with NDEBUG defined.

Modified:
    llvm/trunk/lib/CodeGen/MachineInstr.cpp

Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=192709&r1=192708&r2=192709&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Tue Oct 15 09:40:46 2013
@@ -647,6 +647,7 @@ void MachineInstr::addOperand(MachineFun
     }
   }
 
+#ifndef NDEBUG
   bool isMetaDataOp = Op.getType() == MachineOperand::MO_Metadata;
   // OpNo now points as the desired insertion point.  Unless this is a variadic
   // instruction, only implicit regs are allowed beyond MCID->getNumOperands().
@@ -654,6 +655,7 @@ void MachineInstr::addOperand(MachineFun
   assert((isImpReg || Op.isRegMask() || MCID->isVariadic() ||
           OpNo < MCID->getNumOperands() || isMetaDataOp) &&
          "Trying to add an operand to a machine instr that is already done!");
+#endif
 
   MachineRegisterInfo *MRI = getRegInfo();
 





More information about the llvm-commits mailing list