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