From 986cc38613e7859ab6c9ab8aa9fc2e686f8c2ab4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 20 Oct 2006 18:00:03 +0000 Subject: [PATCH] add method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31066 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineInstr.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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;