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

Alexander Yermolovich via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 15:23:41 PDT 2023


================
@@ -3518,11 +3525,16 @@ 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) {
+        addTypeUnitSymbol(*TU.first);
+        AccelTypeUntsDebugNames.convertDieToOffset();
+        AccelDebugNames.addTypeEntries(AccelTypeUntsDebugNames);
+        AccelTypeUntsDebugNames.clear();
----------------
ayermolo wrote:

yes, good catch. thank you.

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


More information about the llvm-commits mailing list