Use Symtab.find() instead of Symtab.getSymbols().lookup().

This was the only place we directly called lookup on the internal table
of the symbol table.

llvm-svn: 258724
This commit is contained in:
Rui Ueyama 2016-01-25 21:47:25 +00:00
parent de06936f28
commit 304d135f56
1 changed files with 4 additions and 4 deletions

View File

@ -656,10 +656,10 @@ template <class ELFT> void DynamicSection<ELFT>::finalize() {
Entries.push_back( Entries.push_back(
{DT_NEEDED, Out<ELFT>::DynStrTab->addString(F->getSoName())}); {DT_NEEDED, Out<ELFT>::DynStrTab->addString(F->getSoName())});
if (Symbol *S = SymTab.getSymbols().lookup(Config->Init)) if (SymbolBody *B = SymTab.find(Config->Init))
Entries.push_back({DT_INIT, S->Body}); Entries.push_back({DT_INIT, B});
if (Symbol *S = SymTab.getSymbols().lookup(Config->Fini)) if (SymbolBody *B = SymTab.find(Config->Fini))
Entries.push_back({DT_FINI, S->Body}); Entries.push_back({DT_FINI, B});
uint32_t DtFlags = 0; uint32_t DtFlags = 0;
uint32_t DtFlags1 = 0; uint32_t DtFlags1 = 0;