[llvm] [DebugInfo] Make DW_AT_LLVM_stmt_seq work with split DWARF (PR #213128)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 19:06:51 PDT 2026


================
@@ -524,9 +524,15 @@ DIE &DwarfCompileUnit::updateSubprogramScopeDIE(const DISubprogram *SP,
     addFlag(*SPDie, dwarf::DW_AT_APPLE_omit_frame_ptr);
 
   if (emitFuncLineTableOffsets() && LineTableSym) {
-    addSectionLabel(
-        *SPDie, dwarf::DW_AT_LLVM_stmt_sequence, LineTableSym,
-        Asm->getObjFileLowering().getDwarfLineSection()->getBeginSymbol());
+    MCSymbol *Symbol =
+        Asm->getObjFileLowering().getDwarfLineSection()->getBeginSymbol();
+    if (isDwoUnit()) {
+      addSectionDelta(*SPDie, dwarf::DW_AT_LLVM_stmt_sequence, LineTableSym,
+                      Symbol);
+    } else {
+      addSectionLabel(*SPDie, dwarf::DW_AT_LLVM_stmt_sequence, LineTableSym,
+                      Symbol);
+    }
----------------
boomanaiden154 wrote:

It shows up in I think one other caller of `addSectionLabel`. I'll do this cleanup as a followup.

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


More information about the llvm-commits mailing list