[llvm] [LLVM][DWARF] Add support for monolithic types in .debug_names (PR #68131)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 13 15:28:56 PDT 2023


================
@@ -3514,11 +3520,15 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
       return;
     }
 
-    // If the type wasn't dependent on fission addresses, finish adding the type
-    // and all its dependent types.
     for (auto &TU : TypeUnitsToAdd) {
       InfoHolder.computeSizeAndOffsetsForUnit(TU.first.get());
       InfoHolder.emitUnit(TU.first.get(), useSplitDwarf());
+      if (getDwarfVersion() >= 5 &&
+          getAccelTableKind() == AccelTableKind::Dwarf) {
+        addTypeUnit(std::move(TU.first));
----------------
dwblaikie wrote:

Hmm - I still wouldn't've thought you'd need to check if the TU is a comdat. That there'd already be existing code that's resolving/tombstoning - and it's just a question of picking a different tombstone if the relocation happens to be in the .debug_info section. Nothing about checking if it's comdat, or other details.

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


More information about the llvm-commits mailing list