[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstr.h

Chris Lattner sabre at nondot.org
Fri Oct 20 11:00:18 PDT 2006



Changes in directory llvm/include/llvm/CodeGen:

MachineInstr.h updated: 1.188 -> 1.189
---
Log message:

add method


---
Diffs of the changes:  (+11 -2)

 MachineInstr.h |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/CodeGen/MachineInstr.h
diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.188 llvm/include/llvm/CodeGen/MachineInstr.h:1.189
--- llvm/include/llvm/CodeGen/MachineInstr.h:1.188	Thu Oct  5 20:16:29 2006
+++ llvm/include/llvm/CodeGen/MachineInstr.h	Fri Oct 20 13:00:03 2006
@@ -70,9 +70,18 @@
   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;






More information about the llvm-commits mailing list