add an accessor
authorChris Lattner <sabre@nondot.org>
Fri, 6 Oct 2006 01:16:29 +0000 (01:16 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 6 Oct 2006 01:16:29 +0000 (01:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30761 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineInstr.h

index d3136dfae4c83207756e0b51229076ddb7755c1c..6ec01a6b8c14454e67c96d2fe704fbb7a7f9288d 100644 (file)
@@ -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,