mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[Object][ELF] ELFEntityIterator : Add operators for random access
Add operators add/subtract for random access. This is essentially used by lld. llvm-svn: 232453
This commit is contained in:
parent
08c30ff27c
commit
a54521db1b
@ -94,6 +94,18 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
ELFEntityIterator &operator+(difference_type n) {
|
||||
assert(Current && "Attempted to increment an invalid iterator!");
|
||||
Current += n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ELFEntityIterator &operator-(difference_type n) {
|
||||
assert(Current && "Attempted to subtract an invalid iterator!");
|
||||
Current -= n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ELFEntityIterator operator ++(int) {
|
||||
ELFEntityIterator Tmp = *this;
|
||||
++*this;
|
||||
|
Loading…
x
Reference in New Issue
Block a user