Add an idx_iterator to the insertvalue and extractvalue instructions.
authorOwen Anderson <resistor@mac.com>
Thu, 19 Jun 2008 17:15:57 +0000 (17:15 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 19 Jun 2008 17:15:57 +0000 (17:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52493 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Instructions.h

index b92e9010b9d77934981f8ddd860122011e00bd17..36c0a592812557efc377f327387478e50883aef7 100644 (file)
@@ -1586,8 +1586,9 @@ public:
   }  
   static const Type *getIndexedType(const Type *Ptr, unsigned Idx);
 
-  inline const unsigned *idx_begin() const { return Indices.begin(); }
-  inline const unsigned *idx_end()   const { return Indices.end(); }
+  typedef const unsigned* idx_iterator;
+  inline idx_iterator idx_begin() const { return Indices.begin(); }
+  inline idx_iterator idx_end()   const { return Indices.end(); }
 
   Value *getAggregateOperand() {
     return getOperand(0);
@@ -1747,8 +1748,9 @@ public:
     return reinterpret_cast<const PointerType*>(Instruction::getType());
   }
 
-  inline const unsigned *idx_begin() const { return Indices.begin(); }
-  inline const unsigned *idx_end()   const { return Indices.end(); }
+  typedef const unsigned* idx_iterator;
+  inline idx_iterator idx_begin() const { return Indices.begin(); }
+  inline idx_iterator idx_end()   const { return Indices.end(); }
 
   Value *getAggregateOperand() {
     return getOperand(0);