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

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 07:28:26 PDT 2024


================
@@ -527,6 +527,14 @@ DIE &DwarfCompileUnit::updateSubprogramScopeDIE(const DISubprogram *SP) {
           *DD->getCurrentFunction()))
     addFlag(*SPDie, dwarf::DW_AT_APPLE_omit_frame_ptr);
 
+  if (Asm->OutStreamer->getGenerateFuncLineTableOffsets() &&
+      Asm->OutStreamer->getCurrentFuncFirstLineStreamSym()) {
+    addSectionLabel(
+        *SPDie, dwarf::DW_AT_LLVM_stmt_sequence,
+        Asm->OutStreamer->getCurrentFuncFirstLineStreamSym(),
+        Asm->getObjFileLowering().getDwarfLineSection()->getBeginSymbol());
+  }
----------------
alx32 wrote:

@bulbazord / @kastiglione - We're trying to do something similar to `-fcas-friendly-debug-info` in the Apple branch - could you have a look if you're OK with this approach for consistency with Apple branch ? 

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


More information about the llvm-commits mailing list