mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-30 16:17:05 +00:00 
			
		
		
		
	Rename class to be consistent with other iterator classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10213 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -20,7 +20,7 @@ | ||||
| #include "llvm/DerivedTypes.h" | ||||
|  | ||||
| namespace llvm { | ||||
|   class GetElementPtrTypeIterator | ||||
|   class gep_type_iterator | ||||
|     : public forward_iterator<const Type *, ptrdiff_t> { | ||||
|     typedef forward_iterator<const Type*, ptrdiff_t> super; | ||||
|  | ||||
| @@ -28,28 +28,28 @@ namespace llvm { | ||||
|     const Type *CurTy; | ||||
|     unsigned Operand; | ||||
|      | ||||
|     GetElementPtrTypeIterator() {} | ||||
|     gep_type_iterator() {} | ||||
|   public: | ||||
|  | ||||
|     static GetElementPtrTypeIterator begin(GetElementPtrInst *gep) { | ||||
|       GetElementPtrTypeIterator I; | ||||
|     static gep_type_iterator begin(GetElementPtrInst *gep) { | ||||
|       gep_type_iterator I; | ||||
|       I.TheGEP = gep; | ||||
|       I.CurTy = gep->getOperand(0)->getType(); | ||||
|       I.Operand = 1; | ||||
|       return I; | ||||
|     } | ||||
|     static GetElementPtrTypeIterator end(GetElementPtrInst *gep) { | ||||
|       GetElementPtrTypeIterator I; | ||||
|     static gep_type_iterator end(GetElementPtrInst *gep) { | ||||
|       gep_type_iterator I; | ||||
|       I.TheGEP = gep; | ||||
|       I.CurTy = 0; | ||||
|       I.Operand = gep->getNumOperands(); | ||||
|       return I; | ||||
|     } | ||||
|  | ||||
|     bool operator==(const GetElementPtrTypeIterator& x) const {  | ||||
|     bool operator==(const gep_type_iterator& x) const {  | ||||
|       return Operand == x.Operand; | ||||
|     } | ||||
|     bool operator!=(const GetElementPtrTypeIterator& x) const { | ||||
|     bool operator!=(const gep_type_iterator& x) const { | ||||
|       return !operator==(x); | ||||
|     } | ||||
|  | ||||
| @@ -65,7 +65,7 @@ namespace llvm { | ||||
|  | ||||
|     Value *getOperand() const { return TheGEP->getOperand(Operand); } | ||||
|  | ||||
|     GetElementPtrTypeIterator& operator++() {   // Preincrement | ||||
|     gep_type_iterator& operator++() {   // Preincrement | ||||
|       if (const CompositeType *CT = dyn_cast<CompositeType>(CurTy)) { | ||||
|         CurTy = CT->getTypeAtIndex(getOperand()); | ||||
|       } else { | ||||
| @@ -75,17 +75,17 @@ namespace llvm { | ||||
|       return *this;  | ||||
|     } | ||||
|  | ||||
|     GetElementPtrTypeIterator operator++(int) { // Postincrement | ||||
|       GetElementPtrTypeIterator tmp = *this; ++*this; return tmp;  | ||||
|     gep_type_iterator operator++(int) { // Postincrement | ||||
|       gep_type_iterator tmp = *this; ++*this; return tmp;  | ||||
|     } | ||||
|   }; | ||||
|  | ||||
|   inline GetElementPtrTypeIterator gep_type_begin(GetElementPtrInst *GEP) { | ||||
|     return GetElementPtrTypeIterator::begin(GEP); | ||||
|   inline gep_type_iterator gep_type_begin(GetElementPtrInst *GEP) { | ||||
|     return gep_type_iterator::begin(GEP); | ||||
|   } | ||||
|  | ||||
|   inline GetElementPtrTypeIterator gep_type_end(GetElementPtrInst *GEP) { | ||||
|     return GetElementPtrTypeIterator::end(GEP); | ||||
|   inline gep_type_iterator gep_type_end(GetElementPtrInst *GEP) { | ||||
|     return gep_type_iterator::end(GEP); | ||||
|   } | ||||
| } // end namespace llvm | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user