Use existing helper. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303368 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2017-05-18 18:24:11 +00:00
parent e6fac20360
commit f4044c1e68

View File

@ -235,10 +235,7 @@ ELFFile<ELFT>::getSection(const Elf_Sym *Sym, Elf_Sym_Range Symbols,
uint32_t Index = *IndexOrErr;
if (Index == 0)
return nullptr;
auto SectionsOrErr = sections();
if (!SectionsOrErr)
return SectionsOrErr.takeError();
return object::getSection<ELFT>(*SectionsOrErr, Index);
return getSection(Index);
}
template <class ELFT>