summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorPekka Jaaskelainen <pekka.jaaskelainen@tut.fi>2013-10-15 14:40:46 +0000
committerPekka Jaaskelainen <pekka.jaaskelainen@tut.fi>2013-10-15 14:40:46 +0000
commiteb4a6e7c2882b79450b65ce4eefeb90c1cecc49a (patch)
tree495511ff8eb96809498b9ecfc62bde2f56c40087 /llvm/lib/CodeGen/MachineInstr.cpp
parente8ae13f79c9df9df5cf10310702b0397b47342e4 (diff)
downloadbcm5719-llvm-eb4a6e7c2882b79450b65ce4eefeb90c1cecc49a.tar.gz
bcm5719-llvm-eb4a6e7c2882b79450b65ce4eefeb90c1cecc49a.zip
Guard the debug temp variable with NDEBUG to avoid warning/error with NDEBUG defined.
llvm-svn: 192709
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 488516385d7..295b450a0f2 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -647,6 +647,7 @@ void MachineInstr::addOperand(MachineFunction &MF, const MachineOperand &Op) {
}
}
+#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(MachineFunction &MF, const MachineOperand &Op) {
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();
OpenPOWER on IntegriCloud