From: Chris Lattner Date: Thu, 13 Jan 2005 23:26:28 +0000 (+0000) Subject: Add a method X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=79bda7fbe23e6668e1ee53a80f91856f152600a6;p=oota-llvm.git Add a method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19540 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/GetElementPtrTypeIterator.h b/include/llvm/Support/GetElementPtrTypeIterator.h index d9b38f27400..8f6c224a266 100644 --- a/include/llvm/Support/GetElementPtrTypeIterator.h +++ b/include/llvm/Support/GetElementPtrTypeIterator.h @@ -53,6 +53,11 @@ namespace llvm { return CurTy; } + const Type *getIndexedType() const { + const CompositeType *CT = cast(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*(); }