Object: iterator_range accessors for ObjectImage symbols and sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206767 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2014-04-21 18:10:26 +00:00
parent 9a11d668f9
commit 6763d96939

View File

@ -36,9 +36,17 @@ public:
virtual object::symbol_iterator begin_symbols() const = 0;
virtual object::symbol_iterator end_symbols() const = 0;
iterator_range<object::symbol_iterator> symbols() const {
return iterator_range<object::symbol_iterator>(begin_symbols(),
end_symbols());
}
virtual object::section_iterator begin_sections() const = 0;
virtual object::section_iterator end_sections() const = 0;
iterator_range<object::section_iterator> sections() const {
return iterator_range<object::section_iterator>(begin_sections(),
end_sections());
}
virtual /* Triple::ArchType */ unsigned getArch() const = 0;