## This test checks that overlapping compile unit address ranges ## are ignored (i.e. left unchanged) by --garbage-collection ## optimisation. # RUN: yaml2obj %s -o %t.o # RUN: llvm-dwarfutil --garbage-collection %t.o %t1 # RUN: llvm-dwarfdump -a %t1 | FileCheck %s # CHECK: DW_TAG_compile_unit # CHECK: DW_AT_name{{.*}}"CU1" # CHECK: DW_TAG_class_type # CHECK: DW_AT_name{{.*}}"class1" # CHECK: DW_TAG_subprogram # CHECK: DW_AT_name{{.*}}"foo1" # CHECK: DW_AT_low_pc{{.*}}0x0000000000001000 # CHECK: DW_AT_high_pc{{.*}}0x0000000000001010 # CHECK: DW_TAG_subprogram # CHECK: DW_AT_name{{.*}}"foo2" # CHECK: DW_AT_low_pc{{.*}}0x0000000000001000 # CHECK: DW_AT_high_pc{{.*}}0x0000000000001010 # CHECK: DW_AT_type{{.*}}"class2" --- !ELF FileHeader: Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_REL Machine: EM_X86_64 Sections: - Name: .text Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] Address: 0x1000 AddressAlign: 0x0000000000000010 Content: "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" DWARF: debug_abbrev: - Table: - Tag: DW_TAG_compile_unit Children: DW_CHILDREN_yes Attributes: - Attribute: DW_AT_producer Form: DW_FORM_string - Attribute: DW_AT_language Form: DW_FORM_data2 - Attribute: DW_AT_name Form: DW_FORM_string - Attribute: DW_AT_low_pc Form: DW_FORM_addr - Attribute: DW_AT_high_pc Form: DW_FORM_data8 - Tag: DW_TAG_subprogram Children: DW_CHILDREN_no Attributes: - Attribute: DW_AT_name Form: DW_FORM_string - Attribute: DW_AT_low_pc Form: DW_FORM_addr - Attribute: DW_AT_high_pc Form: DW_FORM_data8 - Attribute: DW_AT_type Form: DW_FORM_ref4 - Tag: DW_TAG_class_type Children: DW_CHILDREN_yes Attributes: - Attribute: DW_AT_name Form: DW_FORM_string - Tag: DW_TAG_member Children: DW_CHILDREN_no Attributes: - Attribute: DW_AT_type Form: DW_FORM_ref4 - Attribute: DW_AT_name Form: DW_FORM_string - Tag: DW_TAG_class_type Children: DW_CHILDREN_no Attributes: - Attribute: DW_AT_name Form: DW_FORM_string - Attribute: DW_AT_declaration Form: DW_FORM_flag_present - Tag: DW_TAG_class_type Children: DW_CHILDREN_yes Attributes: - Attribute: DW_AT_name Form: DW_FORM_string - Attribute: DW_AT_declaration Form: DW_FORM_flag_present - Tag: DW_TAG_template_type_parameter Children: DW_CHILDREN_no Attributes: - Attribute: DW_AT_type Form: DW_FORM_ref4 - Tag: DW_TAG_base_type Children: DW_CHILDREN_no Attributes: - Attribute: DW_AT_name Form: DW_FORM_string - Table: - Tag: DW_TAG_compile_unit Children: DW_CHILDREN_yes Attributes: - Attribute: DW_AT_producer Form: DW_FORM_string - Attribute: DW_AT_language Form: DW_FORM_data2 - Attribute: DW_AT_name Form: DW_FORM_string - Attribute: DW_AT_low_pc Form: DW_FORM_addr - Attribute: DW_AT_high_pc Form: DW_FORM_data8 - Tag: DW_TAG_subprogram Children: DW_CHILDREN_no Attributes: - Attribute: DW_AT_name Form: DW_FORM_string - Attribute: DW_AT_low_pc Form: DW_FORM_addr - Attribute: DW_AT_high_pc Form: DW_FORM_data8 - Attribute: DW_AT_type Form: DW_FORM_ref4 - Tag: DW_TAG_class_type Children: DW_CHILDREN_yes Attributes: - Attribute: DW_AT_name Form: DW_FORM_string - Tag: DW_TAG_member Children: DW_CHILDREN_no Attributes: - Attribute: DW_AT_type Form: DW_FORM_ref4 - Attribute: DW_AT_name Form: DW_FORM_string - Tag: DW_TAG_class_type Children: DW_CHILDREN_no Attributes: - Attribute: DW_AT_name Form: DW_FORM_string - Attribute: DW_AT_declaration Form: DW_FORM_flag_present - Tag: DW_TAG_class_type Children: DW_CHILDREN_yes Attributes: - Attribute: DW_AT_name Form: DW_FORM_string - Attribute: DW_AT_declaration Form: DW_FORM_flag_present - Tag: DW_TAG_template_type_parameter Children: DW_CHILDREN_no Attributes: - Attribute: DW_AT_type Form: DW_FORM_ref4 - Tag: DW_TAG_base_type Children: DW_CHILDREN_no Attributes: - Attribute: DW_AT_name Form: DW_FORM_string debug_info: - Version: 4 Entries: - AbbrCode: 1 Values: - CStr: by_hand - Value: 0x04 - CStr: CU1 - Value: 0x1000 - Value: 0x1b - AbbrCode: 3 Values: - CStr: class1 - AbbrCode: 4 Values: - Value: 0x0000006c - CStr: member1 - AbbrCode: 0 - AbbrCode: 3 Values: - CStr: class2 - AbbrCode: 4 Values: - Value: 0x0000006c - CStr: member1 - AbbrCode: 0 - AbbrCode: 3 Values: - CStr: class3 - AbbrCode: 4 Values: - Value: 0x0000006c - CStr: member1 - AbbrCode: 0 - AbbrCode: 8 Values: - CStr: int - AbbrCode: 2 Values: - CStr: foo1 - Value: 0x1000 - Value: 0x10 - Value: 0x0000002a - AbbrCode: 0 - Version: 4 Entries: - AbbrCode: 1 Values: - CStr: by_hand - Value: 0x04 - CStr: CU1 - Value: 0x1000 - Value: 0x1b - AbbrCode: 3 Values: - CStr: class1 - AbbrCode: 4 Values: - Value: 0x0000006c - CStr: member1 - AbbrCode: 0 - AbbrCode: 3 Values: - CStr: class2 - AbbrCode: 4 Values: - Value: 0x0000006c - CStr: member1 - AbbrCode: 0 - AbbrCode: 3 Values: - CStr: class3 - AbbrCode: 4 Values: - Value: 0x0000006c - CStr: member1 - AbbrCode: 0 - AbbrCode: 8 Values: - CStr: int - AbbrCode: 2 Values: - CStr: foo2 - Value: 0x1000 - Value: 0x10 - Value: 0x00000040 - AbbrCode: 0 ...