[llvm] r209586 - llvm-readobj: remove some dead code

Saleem Abdulrasool compnerd at compnerd.org
Sat May 24 12:54:28 PDT 2014


Author: compnerd
Date: Sat May 24 14:54:28 2014
New Revision: 209586

URL: http://llvm.org/viewvc/llvm-project?rev=209586&view=rev
Log:
llvm-readobj: remove some dead code

Modified:
    llvm/trunk/tools/llvm-readobj/COFFDumper.cpp

Modified: llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp?rev=209586&r1=209585&r2=209586&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/COFFDumper.cpp Sat May 24 14:54:28 2014
@@ -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 st
   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) {





More information about the llvm-commits mailing list