[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 6 12:03:12 PDT 2023


================
@@ -559,37 +587,61 @@ void llvm::emitDWARF5AccelTable(
     default:
       continue;
     }
-    CUIndex[CU.index()] = Count++;
+    CUIndex[CU.index()] = CUCount++;
     assert(CU.index() == CU.value()->getUniqueID());
     const DwarfCompileUnit *MainCU =
         DD.useSplitDwarf() ? CU.value()->getSkeleton() : CU.value().get();
     CompUnits.push_back(MainCU->getLabelBegin());
   }
 
+  for (const auto &TU : enumerate(TUs)) {
----------------
dwblaikie wrote:

This isn't a stylistic thing in this case - the CU iteration needed indexes, so it used `enumerate`, whereas the TU iteration doesn't need them, so it shouldn't use `enumerate`, I think.

(but, again, happy to wait on resolving a bunch of this stuff until we better understand the general approach/memory concerns, etc)

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


More information about the llvm-commits mailing list