[llvm-shlib] Fix the version naming style of libLLVM for Windows (#85710)
[llvm-project.git] / bolt / test / X86 / dwarf5-dwarf4-types-backward-forward-cross-reference.test
blob8afbe9e747d24030cd2451788b40c8f1f10d4ca2
1 # REQUIRES: system-linux
3 # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-dwarf4-types-backward-forward-cross-reference-main.s -o %tmain.o
4 # RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-dwarf4-types-backward-forward-cross-reference-helper.s -o %thelper.o
5 # RUN: %clang %cflags %tmain.o %thelper.o -o %t.exe
6 # RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
7 # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s
8 # RUN: llvm-dwarfdump --show-form --verbose --debug-types %t.bolt | FileCheck --check-prefix=POSTCHECKTU %s
10 # This test checks that BOLT handles correctly backward and forward cross CU references
11 # for DWARF5 and DWARF4 with -fdebug-types-section
13 # POSTCHECK: version = 0x0005
14 # POSTCHECK: DW_TAG_type_unit
15 # POSTCHECK: version = 0x0005
16 # POSTCHECK: DW_TAG_compile_unit
17 # POSTCHECK: DW_TAG_variable [14]
18 # POSTCHECK: DW_AT_type [DW_FORM_ref_addr] (0x{{[0-9a-f]+}} "Foo2a")
19 # POSTCHECK: version = 0x0005
20 # POSTCHECK: DW_TAG_compile_unit
21 # POSTCHECK: DW_TAG_variable [14]
22 # POSTCHECK: DW_AT_type [DW_FORM_ref_addr] (0x{{[0-9a-f]+}} "Foo")
23 # POSTCHECK: version = 0x0004
24 # POSTCHECK: DW_TAG_compile_unit
25 # POSTCHECK: DW_TAG_variable [20]
26 # POSTCHECK: DW_AT_type [DW_FORM_ref_addr] (0x{{[0-9a-f]+}} "Foo4a")
27 # POSTCHECK: version = 0x0004
28 # POSTCHECK: DW_TAG_compile_unit
29 # POSTCHECK: DW_TAG_variable [20]
30 # POSTCHECK: DW_AT_type [DW_FORM_ref_addr] (0x{{[0-9a-f]+}} "Foo3a")
32 # POSTCHECKTU: version = 0x0004
33 # POSTCHECKTU: DW_TAG_type_unit
34 # POSTCHECKTU: DW_TAG_structure_type
35 # POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "Foo3a")
36 # POSTCHECKTU: version = 0x0004
37 # POSTCHECKTU: DW_TAG_type_unit
38 # POSTCHECKTU: DW_TAG_structure_type
39 # POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "Foo4")
40 # POSTCHECKTU: version = 0x0004
41 # POSTCHECKTU: DW_TAG_type_unit
42 # POSTCHECKTU: DW_TAG_structure_type
43 # POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "Foo4a")
44 # POSTCHECKTU: version = 0x0004
45 # POSTCHECKTU: DW_TAG_type_unit
46 # POSTCHECKTU: DW_TAG_structure_type
47 # POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "Foo5")