llvm.org GIT mirror llvm / 2701736
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 Rui Ueyama 5 years ago
1 changed file(s) with 5 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
154154 Symbol symbol;
155155 public:
156156 symbol_iterator(const Symbol &s) : symbol(s) {}
157 const Symbol *operator->() const {
158 return &symbol;
159 }
157 const Symbol *operator->() const { return &symbol; }
158 const Symbol &operator*() const { return symbol; }
160159
161160 bool operator==(const symbol_iterator &other) const {
162161 return symbol == other.symbol;
193192
194193 symbol_iterator symbol_begin() const;
195194 symbol_iterator symbol_end() const;
195 iterator_range symbols() const {
196 return iterator_range(symbol_begin(), symbol_end());
197 }
196198
197199 // Cast methods.
198200 static inline bool classof(Binary const *v) {