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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 16:13:29 PST 2023


================
@@ -409,6 +408,11 @@ class DwarfDebug : public DebugHandlerBase {
       std::pair<std::unique_ptr<DwarfTypeUnit>, const DICompositeType *>, 1>
       TypeUnitsUnderConstruction;
 
+  /// Used to set a uniqe ID for a Type Unit.
+  /// This counter represents number of DwarfTypeUnits created, not necessarily
+  /// number of type units that will be emitted.
+  unsigned NumTypeUnitsCreated = 0;
----------------
dwblaikie wrote:

Oh, sorry, yes I get what you're referring to.

What I was wondering is if we could assign the numbering later, once the type is being committed (when we're copying the accelerator table entries over from the temporary table to the main table & switching from DIE pointers to offsets - at that point we know the type units are real, and we could assign numbering there instead? (like the order/index of the entry in the TUSymbols list))

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


More information about the llvm-commits mailing list