[obj2yaml] Print the Relocations header.
authorMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 31 Jul 2012 22:04:08 +0000 (22:04 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 31 Jul 2012 22:04:08 +0000 (22:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161082 91177308-0d34-0410-b5e6-96231b3b80d8

utils/obj2yaml/coff2yaml.cpp

index 2dbd53117a5c4ec52a8aa4ec2d782ce5c856d5f5..c9a71591ef70919001ab14f92e3761ab2cbf66af 100644 (file)
@@ -276,7 +276,8 @@ static llvm::raw_ostream &yamlCOFFSections(llvm::object::COFFObjectFile &Obj,
     Obj.getSectionContents(sect, sectionData);    
     Out << "    SectionData: ";
     yaml::writeHexStream(Out, sectionData) << endl;
-    
+    if (iter->begin_relocations() != iter->end_relocations())
+      Out << "    Relocations:\n";
     for (llvm::object::relocation_iterator rIter = iter->begin_relocations();
                        rIter != iter->end_relocations(); rIter.increment(ec)) {
       const llvm::object::coff_relocation *reloc = Obj.getCOFFRelocation(rIter);