summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-06 01:16:29 +0000
committerChris Lattner <sabre@nondot.org>2006-10-06 01:16:29 +0000
commitb6bb7e1ffe7a1324e70ec410b3a06f008f37b072 (patch)
treefad8583fdc8d9a5beb12da8059aceb3d4d8cfc7f /include/llvm/CodeGen/MachineInstr.h
parent5504602836de40f07ac390a836161e45389870c2 (diff)
downloadllvm-b6bb7e1ffe7a1324e70ec410b3a06f008f37b072.tar.gz
llvm-b6bb7e1ffe7a1324e70ec410b3a06f008f37b072.tar.bz2
llvm-b6bb7e1ffe7a1324e70ec410b3a06f008f37b072.tar.xz
add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30761 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index d3136dfae4..6ec01a6b8c 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,