diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index d3136dfae4c..6ec01a6b8c1 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -189,6 +189,11 @@ public: "Wrong MachineOperand accessor"); offset = Offset; } + void setConstantPoolIndex(unsigned Idx) { + assert(isConstantPoolIndex() && "Wrong MachineOperand accessor"); + contents.immedVal = Idx; + } + /// ChangeToImmediate - Replace this operand with a new immediate operand of /// the specified value. If an operand is known to be an immediate already,