From 0bbe2727d667afc4f2fb8770408e047886fb9db8 Mon Sep 17 00:00:00 2001 From: Pekka Jaaskelainen Date: Tue, 15 Oct 2013 14:40:46 +0000 Subject: [PATCH] Guard the debug temp variable with NDEBUG to avoid warning/error with NDEBUG defined. llvm-svn: 192709 --- lib/CodeGen/MachineInstr.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 488516385d7..295b450a0f2 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/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();