diff options
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 6ec01a6b8c..b3955b6c19 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -70,9 +70,18 @@ public: MachineOperand(const MachineOperand &M) { *this = M; } - + ~MachineOperand() {} - + + static MachineOperand CreateImm(int64_t Val) { + MachineOperand Op; + Op.opType = MachineOperand::MO_Immediate; + Op.contents.immedVal = Val; + Op.IsDef = false; + Op.offset = 0; + return Op; + } + const MachineOperand &operator=(const MachineOperand &MO) { contents = MO.contents; IsDef = MO.IsDef; |