Delete dead code.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 3 Jul 2015 14:46:17 +0000 (14:46 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 3 Jul 2015 14:46:17 +0000 (14:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241353 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Object/ELF.h

index a2ea7bc111e1513319e34369da7b7f394ba8b14c..3b0c548ffe157b01dd6b656302ba92d26bd18734 100644 (file)
@@ -370,7 +370,6 @@ public:
   ErrorOr<StringRef> getSymbolName(const Elf_Sym *Symb, bool IsDynamic) const;
 
   ErrorOr<StringRef> getSectionName(const Elf_Shdr *Section) const;
-  uint64_t getSymbolIndex(const Elf_Sym *sym) const;
   ErrorOr<ArrayRef<uint8_t> > getSectionContents(const Elf_Shdr *Sec) const;
   StringRef getLoadName() const;
 };
@@ -749,18 +748,6 @@ ELFFile<ELFT>::ELFFile(StringRef Object, std::error_code &EC)
   EC = std::error_code();
 }
 
-// Get the symbol table index in the symtab section given a symbol
-template <class ELFT>
-uint64_t ELFFile<ELFT>::getSymbolIndex(const Elf_Sym *Sym) const {
-  uintptr_t SymLoc = uintptr_t(Sym);
-  uintptr_t SymTabLoc = uintptr_t(base() + dot_symtab_sec->sh_offset);
-  assert(SymLoc > SymTabLoc && "Symbol not in symbol table!");
-  uint64_t SymOffset = SymLoc - SymTabLoc;
-  assert(SymOffset % dot_symtab_sec->sh_entsize == 0 &&
-         "Symbol not multiple of symbol size!");
-  return SymOffset / dot_symtab_sec->sh_entsize;
-}
-
 template <class ELFT>
 const typename ELFFile<ELFT>::Elf_Shdr *ELFFile<ELFT>::section_begin() const {
   if (Header->e_shentsize != sizeof(Elf_Shdr))