1 ## This test checks that overlapping function address ranges
2 ## are combined during --garbage-collection optimisation.
4 # RUN: yaml2obj %s -o %t.o
5 # RUN: llvm-dwarfutil --no-odr --garbage-collection %t.o %t1
6 # RUN: llvm-dwarfdump -a %t1 | FileCheck %s
8 # RUN: llvm-dwarfutil --no-odr --linker llvm --garbage-collection %t.o %t1
9 # RUN: llvm-dwarfdump -a %t1 | FileCheck %s
11 # CHECK: DW_TAG_compile_unit
12 # CHECK: DW_AT_name{{.*}}"CU1"
13 # CHECK: DW_AT_low_pc{{.*}}0000000000001000
15 # CHECK: [0x0000000000001000, 0x000000000000102d)
16 # CHECK: [0x0000000000002002, 0x000000000000200d)
17 # CHECK: [0x000000000000201b, 0x000000000000202a)
18 # CHECK: [0x0000000000003002, 0x0000000000003007)
19 # CHECK: [0x0000000000003012, 0x0000000000003017)
20 # CHECK: [0x0000000000003018, 0x000000000000301a)
21 # CHECK: [0x0000000000003022, 0x0000000000003027
22 # CHECK: DW_TAG_class_type
23 # CHECK: DW_AT_name{{.*}}"class1"
24 # CHECK: DW_TAG_class_type
26 # CHECK: DW_TAG_subprogram
27 # CHECK: DW_AT_name{{.*}}"foo1"
28 # CHECK: DW_AT_low_pc{{.*}}0x0000000000001000
29 # CHECK: DW_AT_high_pc{{.*}}0x0000000000001010
30 # CHECK: DW_AT_type{{.*}}"class1"
31 # CHECK: DW_TAG_subprogram
33 # CHECK: DW_AT_low_pc{{.*}}0x0000000000001004
34 # CHECK: DW_AT_high_pc{{.*}}0x0000000000001007
35 # CHECK: DW_AT_type{{.*}}"class2"
36 # CHECK: DW_TAG_subprogram
38 # CHECK: DW_AT_low_pc{{.*}}0x000000000000100d
39 # CHECK: DW_AT_high_pc{{.*}}0x000000000000102d
40 # CHECK: DW_TAG_subprogram
42 # CHECK: DW_AT_low_pc{{.*}}0x0000000000002002
43 # CHECK: DW_AT_high_pc{{.*}}0x000000000000200d
44 # CHECK: DW_TAG_subprogram
46 # CHECK: DW_AT_low_pc{{.*}}0x000000000000201b
47 # CHECK: DW_AT_high_pc{{.*}}0x000000000000202a
48 # CHECK: DW_TAG_subprogram
50 # CHECK: DW_AT_low_pc{{.*}}0x0000000000003002
51 # CHECK: DW_AT_high_pc{{.*}}0x0000000000003007
52 # CHECK: DW_TAG_subprogram
54 # CHECK: DW_AT_low_pc{{.*}}0x0000000000003012
55 # CHECK: DW_AT_high_pc{{.*}}0x0000000000003017
56 # CHECK: DW_TAG_subprogram
58 # CHECK: DW_AT_low_pc{{.*}}0x0000000000003022
59 # CHECK: DW_AT_high_pc{{.*}}0x0000000000003027
60 # CHECK: DW_TAG_subprogram
62 # CHECK: DW_AT_low_pc{{.*}}0x0000000000003012
63 # CHECK: DW_AT_high_pc{{.*}}0x0000000000003017
65 # CHECK: DW_AT_low_pc{{.*}}0x0000000000003018
66 # CHECK: DW_AT_high_pc{{.*}}0x000000000000301a
77 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
79 AddressAlign: 0x0000000000000010
80 Content: "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
83 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
85 AddressAlign: 0x0000000000000010
86 Content: "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
89 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
91 AddressAlign: 0x0000000000000010
92 Content: "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
96 - Tag: DW_TAG_compile_unit
97 Children: DW_CHILDREN_yes
99 - Attribute: DW_AT_producer
101 - Attribute: DW_AT_language
103 - Attribute: DW_AT_name
105 - Attribute: DW_AT_low_pc
107 - Attribute: DW_AT_ranges
108 Form: DW_FORM_sec_offset
109 - Tag: DW_TAG_subprogram
110 Children: DW_CHILDREN_no
112 - Attribute: DW_AT_name
114 - Attribute: DW_AT_low_pc
116 - Attribute: DW_AT_high_pc
118 - Attribute: DW_AT_type
120 - Tag: DW_TAG_class_type
121 Children: DW_CHILDREN_yes
123 - Attribute: DW_AT_name
126 Children: DW_CHILDREN_no
128 - Attribute: DW_AT_type
130 - Attribute: DW_AT_name
132 - Tag: DW_TAG_class_type
133 Children: DW_CHILDREN_no
135 - Attribute: DW_AT_name
137 - Attribute: DW_AT_declaration
138 Form: DW_FORM_flag_present
139 - Tag: DW_TAG_class_type
140 Children: DW_CHILDREN_yes
142 - Attribute: DW_AT_name
144 - Attribute: DW_AT_declaration
145 Form: DW_FORM_flag_present
146 - Tag: DW_TAG_template_type_parameter
147 Children: DW_CHILDREN_no
149 - Attribute: DW_AT_type
151 - Tag: DW_TAG_base_type
152 Children: DW_CHILDREN_no
154 - Attribute: DW_AT_name
251 - LowOffset: 0x0000000000001000
252 HighOffset: 0x000000000000102d
253 - LowOffset: 0x0000000000002000
254 HighOffset: 0x000000000000202d
255 - LowOffset: 0x0000000000000000
256 HighOffset: 0x0000000000000000