diff options
Diffstat (limited to 'include/llvm/Object/ELF.h')
-rw-r--r-- | include/llvm/Object/ELF.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h index 7c10bbf..ddabf59 100644 --- a/include/llvm/Object/ELF.h +++ b/include/llvm/Object/ELF.h @@ -94,18 +94,24 @@ public: return *this; } + ELFEntityIterator &operator+(difference_type n) { + assert(Current && "Attempted to increment an invalid iterator!"); + Current += (n * EntitySize); + return *this; + } + + ELFEntityIterator &operator-(difference_type n) { + assert(Current && "Attempted to subtract an invalid iterator!"); + Current -= (n * EntitySize); + return *this; + } + ELFEntityIterator operator ++(int) { ELFEntityIterator Tmp = *this; ++*this; return Tmp; } - ELFEntityIterator &operator =(const ELFEntityIterator &Other) { - EntitySize = Other.EntitySize; - Current = Other.Current; - return *this; - } - difference_type operator -(const ELFEntityIterator &Other) const { assert(EntitySize == Other.EntitySize && "Subtracting iterators of different EntitySize!"); @@ -203,12 +209,6 @@ public: return *this; } - Elf_Sym_Iter &operator=(const Elf_Sym_Iter &Other) { - EntitySize = Other.EntitySize; - Current = Other.Current; - return *this; - } - difference_type operator-(const Elf_Sym_Iter &Other) const { assert(EntitySize == Other.EntitySize && "Subtracting iterators of different EntitySize!"); |