diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h index 8391724ad941..07f16112938d 100644 --- a/llvm/include/llvm/Object/ELF.h +++ b/llvm/include/llvm/Object/ELF.h @@ -148,8 +148,6 @@ public: ErrorOr getSectionStringTable(Elf_Shdr_Range Sections) const; const Elf_Ehdr *getHeader() const { return Header; } - ErrorOr getSectionIndex(const Elf_Sym *Sym, const Elf_Shdr *SymTab, - ArrayRef ShndxTable) const; ErrorOr getSectionIndex(const Elf_Sym *Sym, Elf_Sym_Range Syms, ArrayRef ShndxTable) const; ErrorOr getSection(const Elf_Sym *Sym, @@ -196,16 +194,6 @@ getExtendedSymbolTableIndex(const typename ELFT::Sym *Sym, return ShndxTable[Index]; } -template -ErrorOr -ELFFile::getSectionIndex(const Elf_Sym *Sym, const Elf_Shdr *SymTab, - ArrayRef ShndxTable) const { - auto SymsOrErr = symbols(SymTab); - if (std::error_code EC = SymsOrErr.getError()) - return EC; - return getSectionIndex(Sym, *SymsOrErr, ShndxTable); -} - template ErrorOr ELFFile::getSectionIndex(const Elf_Sym *Sym, Elf_Sym_Range Syms,