[lld] r276944 - [lld][MachO] Remove some debugging output code that was mistakenly left in in

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 17:28:48 PDT 2016


Author: lhames
Date: Wed Jul 27 19:28:48 2016
New Revision: 276944

URL: http://llvm.org/viewvc/llvm-project?rev=276944&view=rev
Log:
[lld][MachO] Remove some debugging output code that was mistakenly left in in
r276935.

Modified:
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h?rev=276944&r1=276943&r2=276944&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h Wed Jul 27 19:28:48 2016
@@ -92,22 +92,8 @@ struct Relocation {
   bool                isExtern;
   Hex32               value;
   uint32_t            symbol;
-
-#ifndef NDEBUG
-  raw_ostream& operator<<(raw_ostream &OS) const {
-    dump(OS);
-    return OS;
-  }
-
-  void dump(raw_ostream &OS = llvm::dbgs()) const;
-#endif
 };
 
-inline raw_ostream& operator<<(raw_ostream &OS, const Relocation &R) {
-  R.dump(OS);
-  return OS;
-}
-
 /// A typedef so that YAML I/O can treat this vector as a sequence.
 typedef std::vector<Relocation> Relocations;
 

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp?rev=276944&r1=276943&r2=276944&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp Wed Jul 27 19:28:48 2016
@@ -1433,7 +1433,6 @@ normalizedObjectToAtoms(MachOFile *file,
 
   // Create atoms from each section.
   for (auto &sect : normalizedFile.sections) {
-    DEBUG(llvm::dbgs() << "Creating atoms: "; sect.dump());
 
     // If this is a debug-info section parse it specially.
     if (isDebugInfoSection(sect))
@@ -1627,21 +1626,6 @@ normalizedToAtoms(const NormalizedFile &
   }
 }
 
-#ifndef NDEBUG
-void Relocation::dump(llvm::raw_ostream &OS) const {
-  OS << "Relocation (offset=" << llvm::format_hex(offset, 8, true)
-     << ", scatered=" << scattered << ", type=" << type << ", length=" << length
-     << ", pcrel=" << pcRel << ", isExtern=" << isExtern << ", value="
-     << llvm::format_hex(value, 8, true) << ", symbol=" << symbol << ")\n";
-}
-
-void Section::dump(llvm::raw_ostream &OS) const {
-  OS << "Section (\"" << segmentName << ", " << sectionName << "\"";
-  OS << ", addr: " << llvm::format_hex(address, 16, true);
-  OS << ", size: " << llvm::format_hex(content.size(), 8, true) << ")\n";
-}
-#endif
-
 } // namespace normalized
 } // namespace mach_o
 } // namespace lld




More information about the llvm-commits mailing list