Don't use PassInfo* as a type identifier for passes. Instead, use the address of...
[oota-llvm.git] / include / llvm / CodeGen / SlotIndexes.h
index f1f047b44ed2a34561c714a20c2d4b569868c6e2..fe3b0e2d5fe2c47e703d8a1ed171c5e89e9af851 100644 (file)
@@ -475,7 +475,7 @@ namespace llvm {
   public:
     static char ID;
 
-    SlotIndexes() : MachineFunctionPass(&ID), indexListHead(0) {}
+    SlotIndexes() : MachineFunctionPass(ID), indexListHead(0) {}
 
     virtual void getAnalysisUsage(AnalysisUsage &au) const;
     virtual void releaseMemory(); 
@@ -494,6 +494,11 @@ namespace llvm {
       return SlotIndex(front(), 0);
     }
 
+    /// Returns the base index of the last slot in this analysis.
+    SlotIndex getLastIndex() {
+      return SlotIndex(back(), 0);
+    }
+
     /// Returns the invalid index marker for this analysis.
     SlotIndex getInvalidIndex() {
       return getZeroIndex();