summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-05-24 19:54:28 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-05-24 19:54:28 +0000
commita054d531d727d8408ad0b718e6d23898f5678c06 (patch)
tree3232a8c522ab7225a42a31b5a83cb89b6edd4f93 /tools
parent0fc41252ba5efc2ee5ed52bcbd9bd29561714220 (diff)
downloadllvm-a054d531d727d8408ad0b718e6d23898f5678c06.tar.gz
llvm-a054d531d727d8408ad0b718e6d23898f5678c06.tar.bz2
llvm-a054d531d727d8408ad0b718e6d23898f5678c06.tar.xz
llvm-readobj: remove some dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209586 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-readobj/COFFDumper.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/tools/llvm-readobj/COFFDumper.cpp b/tools/llvm-readobj/COFFDumper.cpp
index 26ac181a0b..188e9f8913 100644
--- a/tools/llvm-readobj/COFFDumper.cpp
+++ b/tools/llvm-readobj/COFFDumper.cpp
@@ -80,12 +80,6 @@ private:
void cacheRelocations();
- error_code getSectionContents(
- const std::vector<RelocationRef> &Rels,
- uint64_t Offset,
- ArrayRef<uint8_t> &Contents,
- uint64_t &Addr);
-
error_code getSection(
const std::vector<RelocationRef> &Rels,
uint64_t Offset,
@@ -96,7 +90,6 @@ private:
const llvm::object::COFFObjectFile *Obj;
RelocMapTy RelocMap;
- std::vector<RelocationRef> EmptyRelocs;
};
} // namespace
@@ -467,27 +460,6 @@ static std::string formatSymbol(const std::vector<RelocationRef> &Rels,
return Str.str();
}
-// Given a vector of relocations for a section and an offset into this section
-// the function resolves the symbol used for the relocation at the offset and
-// returns the section content and the address inside the content pointed to
-// by the symbol.
-error_code COFFDumper::getSectionContents(
- const std::vector<RelocationRef> &Rels, uint64_t Offset,
- ArrayRef<uint8_t> &Contents, uint64_t &Addr) {
-
- SymbolRef Sym;
- const coff_section *Section;
-
- if (error_code EC = resolveSymbol(Rels, Offset, Sym))
- return EC;
- if (error_code EC = resolveSectionAndAddress(Obj, Sym, Section, Addr))
- return EC;
- if (error_code EC = Obj->getSectionContents(Section, Contents))
- return EC;
-
- return object_error::success;
-}
-
error_code COFFDumper::getSection(
const std::vector<RelocationRef> &Rels, uint64_t Offset,
const coff_section **SectionPtr, uint64_t *AddrPtr) {