diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 6ec01a6b8c1..b3955b6c198 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;