diff options
| -rw-r--r-- | llvm/include/llvm/Support/GetElementPtrTypeIterator.h | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/GetElementPtrTypeIterator.h b/llvm/include/llvm/Support/GetElementPtrTypeIterator.h index d9b38f27400..8f6c224a266 100644 --- a/llvm/include/llvm/Support/GetElementPtrTypeIterator.h +++ b/llvm/include/llvm/Support/GetElementPtrTypeIterator.h @@ -53,6 +53,11 @@ namespace llvm {        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*(); }  | 

