[llvm-commits] CVS: llvm/include/llvm/Support/GetElementPtrTypeIterator.h

Chris Lattner lattner at cs.uiuc.edu
Thu Jan 13 15:26:41 PST 2005



Changes in directory llvm/include/llvm/Support:

GetElementPtrTypeIterator.h updated: 1.7 -> 1.8
---
Log message:

Add a method


---
Diffs of the changes:  (+5 -0)

Index: llvm/include/llvm/Support/GetElementPtrTypeIterator.h
diff -u llvm/include/llvm/Support/GetElementPtrTypeIterator.h:1.7 llvm/include/llvm/Support/GetElementPtrTypeIterator.h:1.8
--- llvm/include/llvm/Support/GetElementPtrTypeIterator.h:1.7	Sun Apr  4 14:46:54 2004
+++ llvm/include/llvm/Support/GetElementPtrTypeIterator.h	Thu Jan 13 17:26:28 2005
@@ -53,6 +53,11 @@
       return CurTy;
     }
 
+    const Type *getIndexedType() const {
+      const CompositeType *CT = cast<CompositeType>(CurTy);
+      return CT->getTypeAtIndex(getOperand());
+    }
+
     // This is a non-standard operator->.  It allows you to call methods on the
     // current type directly.
     const Type *operator->() const { return operator*(); }






More information about the llvm-commits mailing list