[llvm] r192707 - Do not assert when trying to add a meta data operand with
Pekka Jaaskelainen
pekka.jaaskelainen at tut.fi
Tue Oct 15 07:18:10 PDT 2013
Author: pjaaskel
Date: Tue Oct 15 09:18:10 2013
New Revision: 192707
URL: http://llvm.org/viewvc/llvm-project?rev=192707&view=rev
Log:
Do not assert when trying to add a meta data operand with
MachineInstr::addOperand().
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=192707&r1=192706&r2=192707&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Tue Oct 15 09:18:10 2013
@@ -647,11 +647,12 @@ void MachineInstr::addOperand(MachineFun
}
}
+ 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().
// RegMask operands go between the explicit and implicit operands.
assert((isImpReg || Op.isRegMask() || MCID->isVariadic() ||
- OpNo < MCID->getNumOperands()) &&
+ OpNo < MCID->getNumOperands() || isMetaDataOp) &&
"Trying to add an operand to a machine instr that is already done!");
MachineRegisterInfo *MRI = getRegInfo();
More information about the llvm-commits
mailing list