diff options
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 12 |
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; |