llvm-readobj, COFF: Remove an unused variable
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 13 Nov 2014 07:42:13 +0000 (07:42 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 13 Nov 2014 07:42:13 +0000 (07:42 +0000)
printRelocation doesn't use the section contents.  No functionality
change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221871 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-readobj/COFFDumper.cpp

index bb4315835c20e715d541743e7bcf356c3128956b..1506f06136ea65f32cca68c008accba0e5a35782 100644 (file)
@@ -792,7 +792,6 @@ void COFFDumper::printRelocation(const SectionRef &Section,
   uint64_t RelocType;
   SmallString<32> RelocName;
   StringRef SymbolName;
-  StringRef Contents;
   if (error(Reloc.getOffset(Offset)))
     return;
   if (error(Reloc.getType(RelocType)))
@@ -802,8 +801,6 @@ void COFFDumper::printRelocation(const SectionRef &Section,
   symbol_iterator Symbol = Reloc.getSymbol();
   if (Symbol != Obj->symbol_end() && error(Symbol->getName(SymbolName)))
     return;
-  if (error(Section.getContents(Contents)))
-    return;
 
   if (opts::ExpandRelocs) {
     DictScope Group(W, "Relocation");