[llvm] r241353 - Delete dead code.
Rafael Espindola
rafael.espindola at gmail.com
Fri Jul 3 07:46:17 PDT 2015
Author: rafael
Date: Fri Jul 3 09:46:17 2015
New Revision: 241353
URL: http://llvm.org/viewvc/llvm-project?rev=241353&view=rev
Log:
Delete dead code.
Modified:
llvm/trunk/include/llvm/Object/ELF.h
Modified: llvm/trunk/include/llvm/Object/ELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELF.h?rev=241353&r1=241352&r2=241353&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELF.h (original)
+++ llvm/trunk/include/llvm/Object/ELF.h Fri Jul 3 09:46:17 2015
@@ -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,
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))
More information about the llvm-commits
mailing list