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:
Rafael Espindola
2015-06-25 14:39:35 +00:00
parent b81740d146
commit ca30411d98
3 changed files with 13 additions and 21 deletions

View File

@@ -77,10 +77,9 @@ ModuleInfo::ModuleInfo(ObjectFile *Obj, DIContext *DICtx)
bool NoSymbolTable = (Module->symbol_begin() == Module->symbol_end());
if (NoSymbolTable && Module->isELF()) {
// Fallback to dynamic symbol table, if regular symbol table is stripped.
std::pair<symbol_iterator, symbol_iterator> IDyn =
getELFDynamicSymbolIterators(Module);
for (symbol_iterator si = IDyn.first, se = IDyn.second; si != se; ++si) {
addSymbol(*si, OpdExtractor.get(), OpdAddress);
auto IDyn = cast<ELFObjectFileBase>(Module)->getDynamicSymbolIterators();
for (SymbolRef Sym : IDyn) {
addSymbol(Sym, OpdExtractor.get(), OpdAddress);
}
}
}