From: Chris Lattner Date: Fri, 6 Oct 2006 01:16:29 +0000 (+0000) Subject: add an accessor X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b6bb7e1ffe7a1324e70ec410b3a06f008f37b072;p=oota-llvm.git add an accessor git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30761 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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,