[llvm] [DebugInfo][DWARF] Emit Per-Function Line Table Offsets and End Sequences (PR #110192)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 2 16:24:12 PDT 2024


================
@@ -123,6 +123,9 @@ class MCDwarfLoc {
   friend class MCContext;
   friend class MCDwarfLineEntry;
 
+  // DwarfDebug::endFunctionImpl needs to construct MCDwarfLoc(IsEndOfFunction)
+  friend class DwarfDebug;
----------------
dwblaikie wrote:

That feels like a bit of a layering and encapsulation break & hopefully can be avoided?

What happens if DwarfDebug doesn't do this? Doesn't MCDwarf correctly implicitly terminate the sequence when a new label is requested? Isn't that enough?

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


More information about the llvm-commits mailing list