1## This test checks that overlapping compile unit address ranges 2## are ignored (i.e. left unchanged) by --garbage-collection 3## optimisation. 4 5# RUN: yaml2obj %s -o %t.o 6# RUN: llvm-dwarfutil --garbage-collection %t.o %t1 7# RUN: llvm-dwarfdump -a %t1 | FileCheck %s 8 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_subprogram 14# CHECK: DW_AT_name{{.*}}"foo1" 15# CHECK: DW_AT_low_pc{{.*}}0x0000000000001000 16# CHECK: DW_AT_high_pc{{.*}}0x0000000000001010 17# CHECK: DW_TAG_subprogram 18# CHECK: DW_AT_name{{.*}}"foo2" 19# CHECK: DW_AT_low_pc{{.*}}0x0000000000001000 20# CHECK: DW_AT_high_pc{{.*}}0x0000000000001010 21# CHECK: DW_AT_type{{.*}}"class2" 22 23--- !ELF 24FileHeader: 25 Class: ELFCLASS64 26 Data: ELFDATA2LSB 27 Type: ET_REL 28 Machine: EM_X86_64 29Sections: 30 - Name: .text 31 Type: SHT_PROGBITS 32 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 33 Address: 0x1000 34 AddressAlign: 0x0000000000000010 35 Content: "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" 36DWARF: 37 debug_abbrev: 38 - Table: 39 - Tag: DW_TAG_compile_unit 40 Children: DW_CHILDREN_yes 41 Attributes: 42 - Attribute: DW_AT_producer 43 Form: DW_FORM_string 44 - Attribute: DW_AT_language 45 Form: DW_FORM_data2 46 - Attribute: DW_AT_name 47 Form: DW_FORM_string 48 - Attribute: DW_AT_low_pc 49 Form: DW_FORM_addr 50 - Attribute: DW_AT_high_pc 51 Form: DW_FORM_data8 52 - Tag: DW_TAG_subprogram 53 Children: DW_CHILDREN_no 54 Attributes: 55 - Attribute: DW_AT_name 56 Form: DW_FORM_string 57 - Attribute: DW_AT_low_pc 58 Form: DW_FORM_addr 59 - Attribute: DW_AT_high_pc 60 Form: DW_FORM_data8 61 - Attribute: DW_AT_type 62 Form: DW_FORM_ref4 63 - Tag: DW_TAG_class_type 64 Children: DW_CHILDREN_yes 65 Attributes: 66 - Attribute: DW_AT_name 67 Form: DW_FORM_string 68 - Tag: DW_TAG_member 69 Children: DW_CHILDREN_no 70 Attributes: 71 - Attribute: DW_AT_type 72 Form: DW_FORM_ref4 73 - Attribute: DW_AT_name 74 Form: DW_FORM_string 75 - Tag: DW_TAG_class_type 76 Children: DW_CHILDREN_no 77 Attributes: 78 - Attribute: DW_AT_name 79 Form: DW_FORM_string 80 - Attribute: DW_AT_declaration 81 Form: DW_FORM_flag_present 82 - Tag: DW_TAG_class_type 83 Children: DW_CHILDREN_yes 84 Attributes: 85 - Attribute: DW_AT_name 86 Form: DW_FORM_string 87 - Attribute: DW_AT_declaration 88 Form: DW_FORM_flag_present 89 - Tag: DW_TAG_template_type_parameter 90 Children: DW_CHILDREN_no 91 Attributes: 92 - Attribute: DW_AT_type 93 Form: DW_FORM_ref4 94 - Tag: DW_TAG_base_type 95 Children: DW_CHILDREN_no 96 Attributes: 97 - Attribute: DW_AT_name 98 Form: DW_FORM_string 99 - Table: 100 - Tag: DW_TAG_compile_unit 101 Children: DW_CHILDREN_yes 102 Attributes: 103 - Attribute: DW_AT_producer 104 Form: DW_FORM_string 105 - Attribute: DW_AT_language 106 Form: DW_FORM_data2 107 - Attribute: DW_AT_name 108 Form: DW_FORM_string 109 - Attribute: DW_AT_low_pc 110 Form: DW_FORM_addr 111 - Attribute: DW_AT_high_pc 112 Form: DW_FORM_data8 113 - Tag: DW_TAG_subprogram 114 Children: DW_CHILDREN_no 115 Attributes: 116 - Attribute: DW_AT_name 117 Form: DW_FORM_string 118 - Attribute: DW_AT_low_pc 119 Form: DW_FORM_addr 120 - Attribute: DW_AT_high_pc 121 Form: DW_FORM_data8 122 - Attribute: DW_AT_type 123 Form: DW_FORM_ref4 124 - Tag: DW_TAG_class_type 125 Children: DW_CHILDREN_yes 126 Attributes: 127 - Attribute: DW_AT_name 128 Form: DW_FORM_string 129 - Tag: DW_TAG_member 130 Children: DW_CHILDREN_no 131 Attributes: 132 - Attribute: DW_AT_type 133 Form: DW_FORM_ref4 134 - Attribute: DW_AT_name 135 Form: DW_FORM_string 136 - Tag: DW_TAG_class_type 137 Children: DW_CHILDREN_no 138 Attributes: 139 - Attribute: DW_AT_name 140 Form: DW_FORM_string 141 - Attribute: DW_AT_declaration 142 Form: DW_FORM_flag_present 143 - Tag: DW_TAG_class_type 144 Children: DW_CHILDREN_yes 145 Attributes: 146 - Attribute: DW_AT_name 147 Form: DW_FORM_string 148 - Attribute: DW_AT_declaration 149 Form: DW_FORM_flag_present 150 - Tag: DW_TAG_template_type_parameter 151 Children: DW_CHILDREN_no 152 Attributes: 153 - Attribute: DW_AT_type 154 Form: DW_FORM_ref4 155 - Tag: DW_TAG_base_type 156 Children: DW_CHILDREN_no 157 Attributes: 158 - Attribute: DW_AT_name 159 Form: DW_FORM_string 160 debug_info: 161 - Version: 4 162 Entries: 163 - AbbrCode: 1 164 Values: 165 - CStr: by_hand 166 - Value: 0x04 167 - CStr: CU1 168 - Value: 0x1000 169 - Value: 0x1b 170 - AbbrCode: 3 171 Values: 172 - CStr: class1 173 - AbbrCode: 4 174 Values: 175 - Value: 0x0000006c 176 - CStr: member1 177 - AbbrCode: 0 178 - AbbrCode: 3 179 Values: 180 - CStr: class2 181 - AbbrCode: 4 182 Values: 183 - Value: 0x0000006c 184 - CStr: member1 185 - AbbrCode: 0 186 - AbbrCode: 3 187 Values: 188 - CStr: class3 189 - AbbrCode: 4 190 Values: 191 - Value: 0x0000006c 192 - CStr: member1 193 - AbbrCode: 0 194 - AbbrCode: 8 195 Values: 196 - CStr: int 197 - AbbrCode: 2 198 Values: 199 - CStr: foo1 200 - Value: 0x1000 201 - Value: 0x10 202 - Value: 0x0000002a 203 - AbbrCode: 0 204 - Version: 4 205 Entries: 206 - AbbrCode: 1 207 Values: 208 - CStr: by_hand 209 - Value: 0x04 210 - CStr: CU1 211 - Value: 0x1000 212 - Value: 0x1b 213 - AbbrCode: 3 214 Values: 215 - CStr: class1 216 - AbbrCode: 4 217 Values: 218 - Value: 0x0000006c 219 - CStr: member1 220 - AbbrCode: 0 221 - AbbrCode: 3 222 Values: 223 - CStr: class2 224 - AbbrCode: 4 225 Values: 226 - Value: 0x0000006c 227 - CStr: member1 228 - AbbrCode: 0 229 - AbbrCode: 3 230 Values: 231 - CStr: class3 232 - AbbrCode: 4 233 Values: 234 - Value: 0x0000006c 235 - CStr: member1 236 - AbbrCode: 0 237 - AbbrCode: 8 238 Values: 239 - CStr: int 240 - AbbrCode: 2 241 Values: 242 - CStr: foo2 243 - Value: 0x1000 244 - Value: 0x10 245 - Value: 0x00000040 246 - AbbrCode: 0 247... 248