[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / tools / llvm-dwarfutil / ELF / X86 / gc-default.test
blob6ed645325fc57ae07afc50fb13359a1993ad8cea
1 ## This test checks that debug info related to deleted code (marked with
2 ## default tombstone value) is removed.
4 # RUN: yaml2obj %s -o %t.o
6 # RUN: llvm-dwarfutil --no-odr %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
8 # RUN: llvm-dwarfutil --no-odr --linker classic %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
10 # RUN: llvm-dwarfutil --no-odr --linker parallel %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
12 # RUN: llvm-dwarfutil --no-odr --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
14 # RUN: llvm-dwarfutil --no-odr --no-garbage-collection --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
16 # RUN: llvm-dwarfutil --no-odr --garbage-collection --no-garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-NOGC
18 # RUN: llvm-dwarfutil --no-odr --linker parallel --garbage-collection --no-garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-NOGC
20 # RUN: llvm-dwarfutil --no-odr %t.o --tombstone=universal - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
22 # RUN: llvm-dwarfutil --no-odr --linker parallel %t.o --tombstone=universal - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
24 # CHECK: DW_TAG_compile_unit
25 # CHECK: DW_AT_name{{.*}}"CU1"
26 # CHECK: DW_TAG_class_type
27 # CHECK: DW_AT_name{{.*}}"class1"
28 # CHECK-GC-NOT: DW_TAG_class_type
29 # CHECK-GC-NOT: "class2"
30 # CHECK-GC-NOT: "class3"
31 # CHECK-NOGC: DW_TAG_class_type
32 # CHECK-NOGC: "class2"
33 # CHECK-NOGC: "class3"
34 # CHECK: DW_TAG_subprogram
35 # CHECK: DW_AT_name{{.*}}"foo1"
36 # CHECK: DW_AT_low_pc{{.*}}0x0000000000001000
37 # CHECK: DW_AT_high_pc{{.*}}0x0000000000001010
38 # CHECK: DW_AT_type{{.*}}"class1"
39 # CHECK-GC-NOT: DW_TAG_subprogram
40 # CHECK-GC-NOT: "foo2"
41 # CHECK-NOGC: DW_TAG_subprogram
42 # CHECK-NOGC: "foo2"
45 --- !ELF
46 FileHeader:
47   Class:    ELFCLASS64
48   Data:     ELFDATA2LSB
49   Type:     ET_REL
50   Machine:  EM_X86_64
51 Sections:
52   - Name:            .text
53     Type:            SHT_PROGBITS
54     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
55     Address:         0x1000
56     Size:            0x1b
57 DWARF:
58   debug_abbrev:
59     - Table:
60       - Tag:      DW_TAG_compile_unit
61         Children: DW_CHILDREN_yes
62         Attributes:
63           - Attribute: DW_AT_producer
64             Form:      DW_FORM_string
65           - Attribute: DW_AT_language
66             Form:      DW_FORM_data2
67           - Attribute: DW_AT_name
68             Form:      DW_FORM_string
69           - Attribute: DW_AT_low_pc
70             Form:      DW_FORM_addr
71           - Attribute: DW_AT_high_pc
72             Form:      DW_FORM_data8
73       - Tag:      DW_TAG_subprogram
74         Children: DW_CHILDREN_no
75         Attributes:
76           - Attribute: DW_AT_name
77             Form:      DW_FORM_string
78           - Attribute: DW_AT_low_pc
79             Form:      DW_FORM_addr
80           - Attribute: DW_AT_high_pc
81             Form:      DW_FORM_data8
82           - Attribute: DW_AT_type
83             Form:      DW_FORM_ref4
84       - Tag:      DW_TAG_class_type
85         Children: DW_CHILDREN_yes
86         Attributes:
87           - Attribute: DW_AT_name
88             Form:      DW_FORM_string
89       - Tag:      DW_TAG_member
90         Children: DW_CHILDREN_no
91         Attributes:
92           - Attribute: DW_AT_type
93             Form:      DW_FORM_ref4
94           - Attribute: DW_AT_name
95             Form:      DW_FORM_string
96       - Tag:      DW_TAG_class_type
97         Children: DW_CHILDREN_no
98         Attributes:
99           - Attribute: DW_AT_name
100             Form:      DW_FORM_string
101           - Attribute: DW_AT_declaration
102             Form:      DW_FORM_flag_present
103       - Tag:      DW_TAG_class_type
104         Children: DW_CHILDREN_yes
105         Attributes:
106           - Attribute: DW_AT_name
107             Form:      DW_FORM_string
108           - Attribute: DW_AT_declaration
109             Form:      DW_FORM_flag_present
110       - Tag:      DW_TAG_template_type_parameter
111         Children: DW_CHILDREN_no
112         Attributes:
113           - Attribute: DW_AT_type
114             Form:      DW_FORM_ref4
115       - Tag:      DW_TAG_base_type
116         Children: DW_CHILDREN_no
117         Attributes:
118           - Attribute: DW_AT_name
119             Form:      DW_FORM_string
120   debug_info:
121     - Version: 4
122       Entries:
123         - AbbrCode: 1
124           Values:
125             - CStr: by_hand
126             - Value:  0x04
127             - CStr: CU1
128             - Value:  0x1000
129             - Value:  0x1b
130         - AbbrCode: 3
131           Values:
132             - CStr: class1
133         - AbbrCode: 4
134           Values:
135             - Value:  0x0000006c
136             - CStr: member1
137         - AbbrCode: 0
138         - AbbrCode: 3
139           Values:
140             - CStr: class2
141         - AbbrCode: 4
142           Values:
143             - Value:  0x0000006c
144             - CStr: member1
145         - AbbrCode: 0
146         - AbbrCode: 3
147           Values:
148             - CStr: class3
149         - AbbrCode: 4
150           Values:
151             - Value:  0x0000006c
152             - CStr: member1
153         - AbbrCode: 0
154         - AbbrCode: 8
155           Values:
156             - CStr: int
157         - AbbrCode: 2
158           Values:
159             - CStr: foo1
160             - Value:  0x1000
161             - Value:  0x10
162             - Value:  0x0000002a
163         - AbbrCode: 2
164           Values:
165             - CStr: foo2
166             - Value:  0x0
167             - Value:  0x100
168             - Value:  0x00000040
169         - AbbrCode: 0