[llvm] [BOLT] Fix updating DW_AT_stmt_list for DWARF5 TUs. (PR #79374)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 15:16:08 PST 2024


================
@@ -0,0 +1,113 @@
+# REQUIRES: system-linux
+
+# Check BOLT handles updating DW_AT_stmt_list correctly for TUs when both objects are built with DWARF5.
+
+# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-debug-line-offset-change-after-bolt-main.s -o %tmain.o
+# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-types-dwarf5-types-helper.s -o %thelper.o
+# RUN: %clang %cflags %tmain.o %thelper.o -o %t.exe -Wl,-q
+# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --lite=0 --reorder-blocks=reverse
+# RUN: llvm-dwarfdump --debug-info -r 0 %t.exe > %tlogOffsetNotEqual.txt
+# RUN: llvm-dwarfdump --debug-info -r 0 %t.bolt >> %tlogOffsetNotEqual.txt
+# RUN: llvm-dwarfdump --debug-info -r 0 --debug-line %t.bolt > %tlogCheckLineTable.txt
+# RUN: cat %tlogOffsetNotEqual.txt | FileCheck --check-prefix=CHECK1 %s
+# RUN: cat %tlogCheckLineTable.txt | FileCheck --check-prefix=CHECK2 %s
+
+# Check offset gets modified.
----------------
maksfb wrote:

Use "##" here and below for comments that are not FileCheck directives.

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


More information about the llvm-commits mailing list