[llvm] [BOLT][DWARF] Fix handling .debug_str_offsets for type units (PR #75522)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 14 14:02:28 PST 2023


================
@@ -0,0 +1,58 @@
+# REQUIRES: system-linux
+
+# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-basic-cu.s -o %tmain.o
+# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-types-no-cu.s -o %thelper.o
+# RUN: %clang %cflags -dwarf-5 %tmain.o %thelper.o -o %t.exe -Wl,-q
+# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
+# RUN: llvm-dwarfdump --show-form --verbose --debug-str-offsets %t.exe > %t.txt
+# RUN: llvm-dwarfdump --show-form --verbose --debug-str-offsets %t.bolt >> %t.txt
+# RUN: cat %t.txt | FileCheck --check-prefix=CHECK %s
+
+## This test checks we correclty re-renerate .debug_str_offsets when there are type units that have an offset not shared with CU.
----------------
maksfb wrote:

"re-generate"

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


More information about the llvm-commits mailing list