1 ## This test checks that debug info removal optimization (--garbage-collection)
2 ## does not affect files which do not have dead debug info.
4 # RUN: yaml2obj %s -o %t.o
5 # RUN: llvm-dwarfutil --no-odr --tombstone=maxpc --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s
7 # RUN: llvm-dwarfutil --no-odr --linker llvm --tombstone=maxpc --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s
9 # CHECK: DW_TAG_compile_unit
10 # CHECK: DW_AT_name{{.*}}"CU1"
11 # CHECK: DW_TAG_class_type
12 # CHECK: DW_AT_name{{.*}}"class1"
13 # CHECK: DW_TAG_class_type
15 # CHECK: DW_TAG_subprogram
16 # CHECK: DW_AT_name{{.*}}"foo1"
17 # CHECK: DW_AT_low_pc{{.*}}0x0000000000001000
18 # CHECK: DW_AT_high_pc{{.*}}0x0000000000001010
19 # CHECK: DW_AT_type{{.*}}"class1"
20 # CHECK: DW_TAG_subprogram
22 # CHECK: DW_AT_low_pc{{.*}}0x0000000000001010
23 # CHECK: DW_AT_high_pc{{.*}}0x000000000000101b
24 # CHECK: DW_AT_type{{.*}}"class2"
36 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
42 - Tag: DW_TAG_compile_unit
43 Children: DW_CHILDREN_yes
45 - Attribute: DW_AT_producer
47 - Attribute: DW_AT_language
49 - Attribute: DW_AT_name
51 - Attribute: DW_AT_low_pc
53 - Attribute: DW_AT_high_pc
55 - Tag: DW_TAG_subprogram
56 Children: DW_CHILDREN_no
58 - Attribute: DW_AT_name
60 - Attribute: DW_AT_low_pc
62 - Attribute: DW_AT_high_pc
64 - Attribute: DW_AT_type
66 - Tag: DW_TAG_class_type
67 Children: DW_CHILDREN_yes
69 - Attribute: DW_AT_name
72 Children: DW_CHILDREN_no
74 - Attribute: DW_AT_type
76 - Attribute: DW_AT_name
78 - Tag: DW_TAG_class_type
79 Children: DW_CHILDREN_no
81 - Attribute: DW_AT_name
83 - Attribute: DW_AT_declaration
84 Form: DW_FORM_flag_present
85 - Tag: DW_TAG_class_type
86 Children: DW_CHILDREN_yes
88 - Attribute: DW_AT_name
90 - Attribute: DW_AT_declaration
91 Form: DW_FORM_flag_present
92 - Tag: DW_TAG_template_type_parameter
93 Children: DW_CHILDREN_no
95 - Attribute: DW_AT_type
97 - Tag: DW_TAG_base_type
98 Children: DW_CHILDREN_no
100 - Attribute: DW_AT_name