[llvm] [DebugInfo][DWARF] Emit Per-Function Line Table Offsets and End Sequences (PR #110192)
Zhaoxuan Jiang via llvm-commits
llvm-commits at lists.llvm.org
Tue May 27 00:53:01 PDT 2025
================
@@ -2223,6 +2223,9 @@ void DwarfDebug::beginFunctionImpl(const MachineFunction *MF) {
return;
DwarfCompileUnit &CU = getOrCreateDwarfCompileUnit(SP->getUnit());
+ FunctionLineTableLabel = CU.emitFuncLineTableOffsets()
----------------
nocchijiang wrote:
After further investigation, I realized that this issue isn't strictly specific to Swift. Instead, it's related to scenarios where multiple CUs are emitted in one compiler invocation. In my case, the affected Swift module is configured with `-enable-single-module-llvm-emission`.
The issue can be reproduced using tip-of-tree LLVM compiling llvm-test-suite with a slightly modified `ReleaseLTO-g.cmake` configuration (in order to enable `-emit-func-debug-line-table-offsets` for LTO objects).
```cmake
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-Wl,-mllvm,-emit-func-debug-line-table-offsets" CACHE STRING "")
```
https://github.com/llvm/llvm-project/pull/110192
More information about the llvm-commits
mailing list