add an accessor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30761 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-10-06 01:16:29 +00:00
parent 5504602836
commit b6bb7e1ffe

View File

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