[llvm] [DebugInfo] Add clang flag to enable function-level debug line attribution (PR #93985)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 4 18:26:47 PDT 2024
================
@@ -0,0 +1,68 @@
+; RUN: llc -mtriple=i686-w64-mingw32 -o %t -filetype=obj %s
+; RUN: llvm-dwarfdump -v -all %t | FileCheck %s -check-prefix=NO_STMT_SEQ
+
+; RUN: llc -mtriple=i686-w64-mingw32 -o %t -filetype=obj %s -emit-func-debug-line-table-offsets
+; RUN: llvm-dwarfdump -v -all %t | FileCheck %s -check-prefix=STMT_SEQ
+
+; NO_STMT_SEQ-NOT: DW_AT_META_stmt_sequence
+
+; STMT_SEQ: [2] DW_TAG_subprogram
+; STMT_SEQ: DW_AT_META_stmt_sequence DW_FORM_sec_offset
+; STMT_SEQ: DW_TAG_subprogram [2]
+; STMT_SEQ: DW_AT_META_stmt_sequence [DW_FORM_sec_offset] (0x00000028)
+; STMT_SEQ: DW_AT_name {{.*}}func01
+; STMT_SEQ: DW_TAG_subprogram [2]
+; STMT_SEQ: DW_AT_META_stmt_sequence [DW_FORM_sec_offset] (0x00000038)
+; STMT_SEQ: DW_AT_name {{.*}}main
----------------
alx32 wrote:
Seems we can rely on the offsets being stable and match them as absolute values: https://github.com/llvm/llvm-project/blob/main/llvm/test/tools/llvm-dwarfdump/X86/verbose.test#L15-L30
https://github.com/llvm/llvm-project/pull/93985
More information about the llvm-commits
mailing list