diff --git a/llvm/include/llvm/Object/ObjectFile.h b/llvm/include/llvm/Object/ObjectFile.h --- a/llvm/include/llvm/Object/ObjectFile.h +++ b/llvm/include/llvm/Object/ObjectFile.h @@ -46,7 +46,7 @@ using section_iterator = content_iterator; -typedef std::function SectionFilterPredicate; +typedef std::function SectionFilterPredicate; /// This is a value type class that represents a single relocation in the list /// of relocations in the object file. class RelocationRef { @@ -405,12 +405,12 @@ class SectionFilterIterator { public: SectionFilterIterator(SectionFilterPredicate Pred, - llvm::object::section_iterator const &Begin, - llvm::object::section_iterator const &End) + const section_iterator &Begin, + const section_iterator &End) : Predicate(std::move(Pred)), Iterator(Begin), End(End) { scanPredicate(); } - const llvm::object::SectionRef &operator*() const { return *Iterator; } + const SectionRef &operator*() const { return *Iterator; } SectionFilterIterator &operator++() { ++Iterator; scanPredicate(); @@ -427,15 +427,15 @@ } } SectionFilterPredicate Predicate; - llvm::object::section_iterator Iterator; - llvm::object::section_iterator End; + section_iterator Iterator; + section_iterator End; }; /// Creates an iterator range of SectionFilterIterators for a given Object and /// predicate. class SectionFilter { public: - SectionFilter(SectionFilterPredicate Pred, llvm::object::ObjectFile const &Obj) + SectionFilter(SectionFilterPredicate Pred, const ObjectFile &Obj) : Predicate(std::move(Pred)), Object(Obj) {} SectionFilterIterator begin() { return SectionFilterIterator(Predicate, Object.section_begin(), @@ -448,7 +448,7 @@ private: SectionFilterPredicate Predicate; - llvm::object::ObjectFile const &Object; + const ObjectFile &Object; }; // Inline function definitions.