From 35395192231722cdf66b6914f27f465cc0358c68 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 3 Apr 2014 02:32:47 +0000 Subject: Remove getSymbolValue. All existing users explicitly ask for an address or a file offset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205503 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/COFF.h | 1 - include/llvm/Object/ELFObjectFile.h | 9 --------- include/llvm/Object/MachO.h | 1 - include/llvm/Object/ObjectFile.h | 8 -------- 4 files changed, 19 deletions(-) (limited to 'include/llvm/Object') diff --git a/include/llvm/Object/COFF.h b/include/llvm/Object/COFF.h index af2eb6826e..6ece1b4cd5 100644 --- a/include/llvm/Object/COFF.h +++ b/include/llvm/Object/COFF.h @@ -371,7 +371,6 @@ protected: SymbolRef::Type &Res) const override; error_code getSymbolSection(DataRefImpl Symb, section_iterator &Res) const override; - error_code getSymbolValue(DataRefImpl Symb, uint64_t &Val) const override; void moveSectionNext(DataRefImpl &Sec) const override; error_code getSectionName(DataRefImpl Sec, StringRef &Res) const override; error_code getSectionAddress(DataRefImpl Sec, uint64_t &Res) const override; diff --git a/include/llvm/Object/ELFObjectFile.h b/include/llvm/Object/ELFObjectFile.h index 9bdee9f569..bbb09f6328 100644 --- a/include/llvm/Object/ELFObjectFile.h +++ b/include/llvm/Object/ELFObjectFile.h @@ -68,7 +68,6 @@ protected: SymbolRef::Type &Res) const override; error_code getSymbolSection(DataRefImpl Symb, section_iterator &Res) const override; - error_code getSymbolValue(DataRefImpl Symb, uint64_t &Val) const override; error_code getLibraryNext(DataRefImpl Data, LibraryRef &Result) const override; @@ -395,14 +394,6 @@ error_code ELFObjectFile::getSymbolSection(DataRefImpl Symb, return object_error::success; } -template -error_code ELFObjectFile::getSymbolValue(DataRefImpl Symb, - uint64_t &Val) const { - const Elf_Sym *ESym = getSymbol(Symb); - Val = ESym->st_value; - return object_error::success; -} - template void ELFObjectFile::moveSectionNext(DataRefImpl &Sec) const { Sec = toDRI(++toELFShdrIter(Sec)); diff --git a/include/llvm/Object/MachO.h b/include/llvm/Object/MachO.h index acd391ba33..1a957d6951 100644 --- a/include/llvm/Object/MachO.h +++ b/include/llvm/Object/MachO.h @@ -71,7 +71,6 @@ public: uint32_t getSymbolFlags(DataRefImpl Symb) const override; error_code getSymbolSection(DataRefImpl Symb, section_iterator &Res) const override; - error_code getSymbolValue(DataRefImpl Symb, uint64_t &Val) const override; void moveSectionNext(DataRefImpl &Sec) const override; error_code getSectionName(DataRefImpl Sec, StringRef &Res) const override; diff --git a/include/llvm/Object/ObjectFile.h b/include/llvm/Object/ObjectFile.h index 1fdfbe81b2..87c1763a25 100644 --- a/include/llvm/Object/ObjectFile.h +++ b/include/llvm/Object/ObjectFile.h @@ -156,9 +156,6 @@ public: /// end_sections() if it is undefined or is an absolute symbol. error_code getSection(section_iterator &Result) const; - /// @brief Get value of the symbol in the symbol table. - error_code getValue(uint64_t &Val) const; - const ObjectFile *getObject() const; }; @@ -238,7 +235,6 @@ protected: SymbolRef::Type &Res) const = 0; virtual error_code getSymbolSection(DataRefImpl Symb, section_iterator &Res) const = 0; - virtual error_code getSymbolValue(DataRefImpl Symb, uint64_t &Val) const = 0; // Same as above for SectionRef. friend class SectionRef; @@ -375,10 +371,6 @@ inline error_code SymbolRef::getType(SymbolRef::Type &Result) const { return getObject()->getSymbolType(getRawDataRefImpl(), Result); } -inline error_code SymbolRef::getValue(uint64_t &Val) const { - return getObject()->getSymbolValue(getRawDataRefImpl(), Val); -} - inline const ObjectFile *SymbolRef::getObject() const { const SymbolicFile *O = BasicSymbolRef::getObject(); return cast(O); -- cgit v1.2.3