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

Chris Lattner lattner at cs.uiuc.edu
Mon Nov 18 00:58:02 PST 2002


Changes in directory llvm/include/llvm/CodeGen:

MachineInstr.h updated: 1.88 -> 1.89

---
Log message:

Add helper method


---
Diffs of the changes:

Index: llvm/include/llvm/CodeGen/MachineInstr.h
diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.88 llvm/include/llvm/CodeGen/MachineInstr.h:1.89
--- llvm/include/llvm/CodeGen/MachineInstr.h:1.88	Sun Nov 17 17:21:26 2002
+++ llvm/include/llvm/CodeGen/MachineInstr.h	Mon Nov 18 00:57:05 2002
@@ -190,6 +190,10 @@
     return regNum;
   }
 
+  inline unsigned getReg() const {
+    assert(hasAllocatedReg() && "Cannot call MachineOperand::getReg()!");
+    return regNum;
+  }    
   
   friend std::ostream& operator<<(std::ostream& os, const MachineOperand& mop);
 





More information about the llvm-commits mailing list