diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-10-20 18:00:03 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-10-20 18:00:03 +0000 |
| commit | 819cb9ad6133bfb2e31582c0b1e56bd6d6916da3 (patch) | |
| tree | 7e44a62e06ac4e6e25180178b0274848d1f77382 | |
| parent | c0fb567e2346cb150afab9c86dee2128ca1b063c (diff) | |
| download | bcm5719-llvm-819cb9ad6133bfb2e31582c0b1e56bd6d6916da3.tar.gz bcm5719-llvm-819cb9ad6133bfb2e31582c0b1e56bd6d6916da3.zip | |
add method
llvm-svn: 31066
| -rw-r--r-- | llvm/include/llvm/CodeGen/MachineInstr.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h index 6ec01a6b8c1..b3955b6c198 100644 --- a/llvm/include/llvm/CodeGen/MachineInstr.h +++ b/llvm/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; |

