[PATCH] D154669: [BOLT][DWARF] Don't check string offsets

Alexander Yermolovich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 6 17:26:08 PDT 2023


ayermolo created this revision.
Herald added subscribers: treapster, hoy, modimo, wenlei.
Herald added a reviewer: rafauler.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a project: All.
ayermolo requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

With different linker, the offset of strings can change.

Test Plan:


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154669

Files:
  bolt/test/X86/dwarf4-types-dwarf5-types.test
  bolt/test/X86/dwarf4-types.test
  bolt/test/X86/dwarf5-dwarf4-types-backward-forward-cross-reference.test


Index: bolt/test/X86/dwarf5-dwarf4-types-backward-forward-cross-reference.test
===================================================================
--- bolt/test/X86/dwarf5-dwarf4-types-backward-forward-cross-reference.test
+++ bolt/test/X86/dwarf5-dwarf4-types-backward-forward-cross-reference.test
@@ -32,16 +32,16 @@
 # POSTCHECKTU: version = 0x0004
 # POSTCHECKTU: DW_TAG_type_unit
 # POSTCHECKTU: DW_TAG_structure_type
-# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000020] = "Foo3a")
+# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "Foo3a")
 # POSTCHECKTU: version = 0x0004
 # POSTCHECKTU: DW_TAG_type_unit
 # POSTCHECKTU: DW_TAG_structure_type
-# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000035] = "Foo4")
+# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "Foo4")
 # POSTCHECKTU: version = 0x0004
 # POSTCHECKTU: DW_TAG_type_unit
 # POSTCHECKTU: DW_TAG_structure_type
-# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000004f] = "Foo4a")
+# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "Foo4a")
 # POSTCHECKTU: version = 0x0004
 # POSTCHECKTU: DW_TAG_type_unit
 # POSTCHECKTU: DW_TAG_structure_type
-# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000000e] = "Foo5")
+# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "Foo5")
Index: bolt/test/X86/dwarf4-types.test
===================================================================
--- bolt/test/X86/dwarf4-types.test
+++ bolt/test/X86/dwarf4-types.test
@@ -47,7 +47,7 @@
 # POSTCHECKTU: DW_TAG_pointer_type [4]
 # POSTCHECKTU-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0051 => {0x00000051} "char")
 # POSTCHECKTU: DW_TAG_base_type [5]
-# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000000e] = "char")
+# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "char")
 
 # POSTCHECKTU: version = 0x0004
 # POSTCHECKTU-SAME: type_signature = 0x49dc260088be7e56
@@ -61,4 +61,4 @@
 # POSTCHECKTU: DW_TAG_pointer_type [4]
 # POSTCHECKTU-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0045 => {0x0000009e} "char")
 # POSTCHECKTU: DW_TAG_base_type [5]
-# POSTCHECKTU-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000000e] = "char")
+# POSTCHECKTU-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "char")
Index: bolt/test/X86/dwarf4-types-dwarf5-types.test
===================================================================
--- bolt/test/X86/dwarf4-types-dwarf5-types.test
+++ bolt/test/X86/dwarf4-types-dwarf5-types.test
@@ -62,7 +62,7 @@
 # POSTCHECKTU: DW_TAG_pointer_type
 # POSTCHECKTU-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0051 => {0x{{[0-9a-f]+}}} "char")
 # POSTCHECKTU: DW_TAG_base_type
-# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000000e] = "char")
+# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "char")
 
 # POSTCHECKTU: version = 0x0004
 # POSTCHECKTU-SAME: type_signature = 0x49dc260088be7e56
@@ -76,4 +76,4 @@
 # POSTCHECKTU: DW_TAG_pointer_type
 # POSTCHECKTU-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0045 => {0x{{[0-9a-f]+}}} "char")
 # POSTCHECKTU: DW_TAG_base_type
-# POSTCHECKTU-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000000e] = "char")
+# POSTCHECKTU-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "char")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154669.537938.patch
Type: text/x-patch
Size: 3322 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230707/57a9b641/attachment.bin>


More information about the llvm-commits mailing list