summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-07-03 14:46:17 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-07-03 14:46:17 +0000
commitc026417420f5896fe8151a6b2ec89a15f81a274f (patch)
tree51eba78405e37ff537b07e13ef5a3777926bb37a /llvm/include
parentd0f7b425a7c108e6c509d9e54b531321665f6452 (diff)
downloadbcm5719-llvm-c026417420f5896fe8151a6b2ec89a15f81a274f.tar.gz
bcm5719-llvm-c026417420f5896fe8151a6b2ec89a15f81a274f.zip
Delete dead code.
llvm-svn: 241353
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Object/ELF.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h
index a2ea7bc111e..3b0c548ffe1 100644
--- a/llvm/include/llvm/Object/ELF.h
+++ b/llvm/include/llvm/Object/ELF.h
@@ -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))
OpenPOWER on IntegriCloud