[llvm-shlib] Fix the version naming style of libLLVM for Windows (#85710)
[llvm-project.git] / bolt / test / X86 / dwarf5-df-inlined-subroutine-gc-sections-range.test
blob6e9bd0502d8b6e0b7a5e4d2cad8b18be90eda6a3
1 ; REQUIRES: x86_64-linux
2 ; RUN: rm -rf %t
3 ; RUN: mkdir %t
4 ; RUN: cd %t
5 ; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-inlined-subroutine-gc-sections-range-main.s \
6 ; RUN: -split-dwarf-file=main.dwo -o main.o
7 ; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-inlined-subroutine-gc-sections-range-helper.s \
8 ; RUN: -split-dwarf-file=helper.dwo -o helper.o
9 ; RUN: %clang --target=x86_64-pc-linux -fuse-ld=lld -Wl,-gc-sections -Wl,-q -gdwarf-5 -gsplit-dwarf=split main.o helper.o -o main.exe
10 ; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
11 ; RUN: llvm-dwarfdump --debug-addr main.exe > log.txt
12 ; RUN: llvm-dwarfdump --debug-rnglists --verbose --show-form main.dwo >> log.txt
13 ; RUN: llvm-dwarfdump --debug-info --verbose --show-form main.dwo >> log.txt
14 ; RUN: llvm-dwarfdump --debug-rnglists --verbose --show-form helper.dwo >> log.txt
15 ; RUN: llvm-dwarfdump --debug-info --verbose --show-form helper.dwo >> log.txt
16 ; RUN: llvm-dwarfdump --debug-addr main.exe.bolt > logBolt.txt
17 ; RUN: llvm-dwarfdump --debug-info --verbose --show-form main.dwo.dwo >> logBolt.txt
18 ; RUN: llvm-dwarfdump --debug-info --verbose --show-form helper.dwo.dwo >> logBolt.txt
19 ; RUN: cat log.txt | FileCheck -check-prefix=BOLT-PRE %s
20 ; RUN: cat logBolt.txt | FileCheck -check-prefix=BOLT-MAIN %s
22 ; Tests whether BOLT handles correctly DW_TAG_inlined_subroutine when DW_AT_ranges is 0,
23 ; and split dwarf is enabled.
25 ; BOLT-PRE: Addrs:
26 ; BOLT-PRE: 0x0000000000000000
27 ; BOLT-PRE: 0x0000000000000000
28 ; BOLT-PRE-NOT: 0x0000000000000000
29 ; BOLT-PRE: Addrs:
30 ; BOLT-PRE: 0x0000000000000000
31 ; BOLT-PRE: 0x0000000000000000
32 ; BOLT-PRE: 0x0000000000000000
34 ; main.dwo
35 ; BOLT-PRE: [DW_RLE_base_addressx]:  0x0000000000000002
36 ; BOLT-PRE: [DW_RLE_offset_pair  ]:  0x0000000000000018, 0x000000000000002d => [0x000000000000001a, 0x000000000000002f)
37 ; BOLT-PRE: [DW_RLE_end_of_list  ]
38 ; BOLT-PRE: [DW_RLE_base_addressx]:  0x0000000000000002
39 ; BOLT-PRE: [DW_RLE_offset_pair  ]:  0x0000000000000033, 0x0000000000000042 => [0x0000000000000035, 0x0000000000000044)
40 ; BOLT-PRE: [DW_RLE_end_of_list  ]
41 ; BOLT-PRE: DW_TAG_inlined_subroutine [9] * (0x0000006c)
42 ; BOLT-PRE: DW_AT_abstract_origin [DW_FORM_ref4]  (cu + 0x0044 => {0x00000044} "_Z7doStuffi")
43 ; BOLT-PRE: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist = 0x00000014
44 ; BOLT-PRE:   [0x000000000000001a, 0x000000000000002f))
45 ; BOLT-PRE: DW_TAG_inlined_subroutine [9] * (0x0000006c)
46 ; BOLT-PRE: DW_AT_abstract_origin [DW_FORM_ref4]  (cu + 0x005a => {0x0000005a} "_Z11doStuffSamei")
47 ; BOLT-PRE: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x1) rangelist = 0x0000001a
48 ; BOLT-PRE:   [0x0000000000000035, 0x0000000000000044))
50 ; helper.dwo
51 ; BOLT-PRE: [DW_RLE_base_addressx]:  0x0000000000000002
52 ; BOLT-PRE: [DW_RLE_offset_pair  ]:  0x000000000000000d, 0x000000000000001a => [0x000000000000000f, 0x000000000000001c)
53 ; BOLT-PRE: [DW_RLE_end_of_list  ]
54 ; BOLT-PRE: [DW_RLE_base_addressx]:  0x0000000000000002
55 ; BOLT-PRE: [DW_RLE_offset_pair  ]:  0x0000000000000020, 0x000000000000002d => [0x0000000000000022, 0x000000000000002f)
56 ; BOLT-PRE: [DW_RLE_end_of_list  ]
57 ; BOLT-PRE: DW_TAG_inlined_subroutine [11] * (0x0000008c)
58 ; BOLT-PRE: DW_AT_abstract_origin [DW_FORM_ref4]  (cu + 0x0054 => {0x00000054} "_Z12doStuff2Samei")
59 ; BOLT-PRE: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist = 0x00000014
60 ; BOLT-PRE:   [0x000000000000000f, 0x000000000000001c))
61 ; BOLT-PRE: DW_TAG_inlined_subroutine [11] * (0x0000008c)
62 ; BOLT-PRE: DW_AT_abstract_origin [DW_FORM_ref4]  (cu + 0x0072 => {0x00000072} "_Z8doStuff2i")
63 ; BOLT-PRE: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x1) rangelist = 0x0000001a
64 ; BOLT-PRE:   [0x0000000000000022, 0x000000000000002f))
66 ; BOLT-MAIN: Addrs:
67 ; BOLT-MAIN: 0x0000000000000000
68 ; BOLT-MAIN-NOT: 0x0000000000000000
69 ; BOLT-MAIN-NOT: 0x0000000000000000
70 ; BOLT-MAIN-NOT: 0x0000000000000000
71 ; BOLT-MAIN: Addrs:
72 ; BOLT-MAIN: 0x0000000000000000
74 ; main.dwo.dwo
75 ; BOLT-MAIN: DW_TAG_inlined_subroutine
76 ; BOLT-MAIN: DW_AT_abstract_origin [DW_FORM_ref4]  (cu + 0x0044 => {0x00000044} "_Z7doStuffi")
77 ; BOLT-MAIN: DW_AT_call_file
78 ; BOLT-MAIN: DW_AT_call_line
79 ; BOLT-MAIN: DW_AT_call_column
80 ; BOLT-MAIN: DW_AT_low_pc [DW_FORM_addrx]  (indexed (00000002) address = <unresolved>)
81 ; BOLT-MAIN: DW_AT_high_pc [DW_FORM_data4] (0x00000015)
82 ; BOLT-MAIN: DW_TAG_inlined_subroutine
83 ; BOLT-MAIN: DW_AT_abstract_origin [DW_FORM_ref4]  (cu + 0x005a => {0x0000005a} "_Z11doStuffSamei")
84 ; BOLT-MAIN: DW_AT_call_file
85 ; BOLT-MAIN: DW_AT_call_line
86 ; BOLT-MAIN: DW_AT_call_column
87 ; BOLT-MAIN: DW_AT_low_pc [DW_FORM_addrx]  (indexed (00000003) address = <unresolved>)
88 ; BOLT-MAIN: DW_AT_high_pc [DW_FORM_data4] (0x0000000f)
90 ; helper.dwo.dwo
91 ; BOLT-MAIN: DW_TAG_inlined_subroutine
92 ; BOLT-MAIN: DW_AT_abstract_origin [DW_FORM_ref4]  (cu + 0x0054 => {0x00000054} "_Z12doStuff2Samei")
93 ; BOLT-MAIN: DW_AT_call_file
94 ; BOLT-MAIN: DW_AT_call_line
95 ; BOLT-MAIN: DW_AT_call_column
96 ; BOLT-MAIN: DW_AT_low_pc [DW_FORM_addrx]  (indexed (00000000) address = <unresolved>)
97 ; BOLT-MAIN: DW_AT_high_pc [DW_FORM_data4] (0x0000001a)
98 ; BOLT-MAIN: DW_TAG_inlined_subroutine
99 ; BOLT-MAIN: DW_AT_abstract_origin [DW_FORM_ref4]  (cu + 0x0072 => {0x00000072} "_Z8doStuff2i")
100 ; BOLT-MAIN: DW_AT_call_file
101 ; BOLT-MAIN: DW_AT_call_line
102 ; BOLT-MAIN: DW_AT_call_column
103 ; BOLT-MAIN: DW_AT_low_pc [DW_FORM_addrx]  (indexed (00000000) address = <unresolved>)
104 ; BOLT-MAIN: DW_AT_high_pc [DW_FORM_data4] (0x0000002d)