mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 17:24:48 +00:00
Modernize getELFDynamicSymbolIterators.
* Have it return a iterator_range. * Remove the global function. * Rename to getDynamicSymbolIterators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240644 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -46,8 +46,7 @@ public:
|
||||
// and addend or not.
|
||||
virtual bool hasRelocationAddend(DataRefImpl Rel) const = 0;
|
||||
|
||||
virtual std::pair<symbol_iterator, symbol_iterator>
|
||||
getELFDynamicSymbolIterators() const = 0;
|
||||
virtual symbol_iterator_range getDynamicSymbolIterators() const = 0;
|
||||
|
||||
virtual uint64_t getSectionFlags(SectionRef Sec) const = 0;
|
||||
virtual uint32_t getSectionType(SectionRef Sec) const = 0;
|
||||
@ -237,8 +236,7 @@ public:
|
||||
ELFT::Is64Bits);
|
||||
}
|
||||
|
||||
std::pair<symbol_iterator, symbol_iterator>
|
||||
getELFDynamicSymbolIterators() const override;
|
||||
symbol_iterator_range getDynamicSymbolIterators() const override;
|
||||
|
||||
bool isRelocatableObject() const override;
|
||||
};
|
||||
@ -855,20 +853,15 @@ unsigned ELFObjectFile<ELFT>::getArch() const {
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
std::pair<symbol_iterator, symbol_iterator>
|
||||
ELFObjectFile<ELFT>::getELFDynamicSymbolIterators() const {
|
||||
return std::make_pair(dynamic_symbol_begin(), dynamic_symbol_end());
|
||||
ObjectFile::symbol_iterator_range
|
||||
ELFObjectFile<ELFT>::getDynamicSymbolIterators() const {
|
||||
return make_range(dynamic_symbol_begin(), dynamic_symbol_end());
|
||||
}
|
||||
|
||||
template <class ELFT> bool ELFObjectFile<ELFT>::isRelocatableObject() const {
|
||||
return EF.getHeader()->e_type == ELF::ET_REL;
|
||||
}
|
||||
|
||||
inline std::pair<symbol_iterator, symbol_iterator>
|
||||
getELFDynamicSymbolIterators(const SymbolicFile *Obj) {
|
||||
return cast<ELFObjectFileBase>(Obj)->getELFDynamicSymbolIterators();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user