mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Object: Add range iterators to Archive symbols
Also define operator* for symbol iterator just like Archive children iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231203 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5a04a316a0
commit
2701736388
@ -155,9 +155,8 @@ public:
|
||||
Symbol symbol;
|
||||
public:
|
||||
symbol_iterator(const Symbol &s) : symbol(s) {}
|
||||
const Symbol *operator->() const {
|
||||
return &symbol;
|
||||
}
|
||||
const Symbol *operator->() const { return &symbol; }
|
||||
const Symbol &operator*() const { return symbol; }
|
||||
|
||||
bool operator==(const symbol_iterator &other) const {
|
||||
return symbol == other.symbol;
|
||||
@ -194,6 +193,9 @@ public:
|
||||
|
||||
symbol_iterator symbol_begin() const;
|
||||
symbol_iterator symbol_end() const;
|
||||
iterator_range<symbol_iterator> symbols() const {
|
||||
return iterator_range<symbol_iterator>(symbol_begin(), symbol_end());
|
||||
}
|
||||
|
||||
// Cast methods.
|
||||
static inline bool classof(Binary const *v) {
|
||||
|
Loading…
Reference in New Issue
Block a user