diff options
author | dim <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
commit | 782067d0278612ee75d024b9b135c221c327e9e8 (patch) | |
tree | a6140557876943cdd800ee997c9317283394b22c /include/llvm/Object/ELF.h | |
parent | 6669eceb008a9f13853b330dc0b099d6386fe879 (diff) | |
download | FreeBSD-src-782067d0278612ee75d024b9b135c221c327e9e8.zip FreeBSD-src-782067d0278612ee75d024b9b135c221c327e9e8.tar.gz |
Vendor import of llvm trunk r238337:
https://llvm.org/svn/llvm-project/llvm/trunk@238337
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!"); |