aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-08-30 05:50:32 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-08-30 05:50:32 +0000
commitc93e13319113e07961cac18ba0b2fffca22f8300 (patch)
tree12faf4fee4abcbc460e45798fda80b41c7f755a0 /include
parent4e84e4535b2eab00a84dc7e2d3bb2c71d3e79f94 (diff)
downloadexternal_llvm-c93e13319113e07961cac18ba0b2fffca22f8300.zip
external_llvm-c93e13319113e07961cac18ba0b2fffca22f8300.tar.gz
external_llvm-c93e13319113e07961cac18ba0b2fffca22f8300.tar.bz2
Added CreateFrameIndex to create a FrameIndex MachineOperand without a MachineInstr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41596 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index 48cf62c..8fe446f 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -102,6 +102,18 @@ public:
return Op;
}
+ static MachineOperand CreateFrameIndex(unsigned Idx) {
+ MachineOperand Op;
+ Op.opType = MachineOperand::MO_FrameIndex;
+ Op.contents.immedVal = Idx;
+ Op.IsDef = false;
+ Op.IsImp = false;
+ Op.IsKill = false;
+ Op.IsDead = false;
+ Op.auxInfo.offset = 0;
+ return Op;
+ }
+
const MachineOperand &operator=(const MachineOperand &MO) {
contents = MO.contents;
IsDef = MO.IsDef;