This function never returns null, don't check it.

llvm-svn: 243982
This commit is contained in:
Rafael Espindola 2015-08-04 14:00:56 +00:00
parent dcc3b435ab
commit 30318518a5
1 changed files with 2 additions and 4 deletions

View File

@ -51,10 +51,8 @@ template <class ELFT> void elf2::ObjectFile<ELFT>::initializeSymbols() {
Syms = Elf_Sym_Range(Syms.begin() + 1, Syms.end());
auto NumSymbols = std::distance(Syms.begin(), Syms.end());
SymbolBodies.reserve(NumSymbols);
for (const Elf_Sym &Sym : Syms) {
if (SymbolBody *Body = createSymbolBody(StringTable, &Sym))
SymbolBodies.push_back(Body);
}
for (const Elf_Sym &Sym : Syms)
SymbolBodies.push_back(createSymbolBody(StringTable, &Sym));
}
template <class ELFT>