[llvm] Allow the dumping of .dwo files contents to show up when dumping an e… (PR #66726)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 16:01:52 PST 2023


================
@@ -1007,9 +1007,17 @@ void DWARFContext::dump(
   auto dumpDebugInfo = [&](const char *Name, unit_iterator_range Units) {
     OS << '\n' << Name << " contents:\n";
     if (auto DumpOffset = DumpOffsets[DIDT_ID_DebugInfo])
-      for (const auto &U : Units)
+      for (const auto &U : Units) {
         U->getDIEForOffset(*DumpOffset)
             .dump(OS, 0, DumpOpts.noImplicitRecursion());
+        DWARFDie CUDie = U->getUnitDIE(false);
+        DWARFDie CUNonSkeletonDie = U->getNonSkeletonUnitDIE(false);
+        if (CUNonSkeletonDie && CUDie != CUNonSkeletonDie) {
+          CUNonSkeletonDie.getDwarfUnit()->getDIEForOffset(*DumpOffset)
+              .dump(OS, 0, DumpOpts.noImplicitRecursion());
+
----------------
dwblaikie wrote:

extra blank line could be removed

https://github.com/llvm/llvm-project/pull/66726


More information about the llvm-commits mailing list