154 lines · plain
1## This test checks that debug info related to deleted code (marked with2## tombstone=maxpc) is removed.3 4## RUN: yaml2obj %s -o %t.o5 6# RUN: llvm-dwarfutil --no-odr --tombstone=maxpc --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s7# RUN: llvm-dwarfutil --no-odr --tombstone=universal --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s8 9# RUN: llvm-dwarfutil --no-odr --linker parallel --tombstone=maxpc --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s10# RUN: llvm-dwarfutil --no-odr --linker parallel --tombstone=universal --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s11 12# CHECK: DW_TAG_compile_unit13# CHECK: DW_AT_name{{.*}}"CU1"14# CHECK: DW_TAG_class_type15# CHECK: DW_AT_name{{.*}}"class1"16# CHECK-NOT: DW_TAG_class_type17# CHECK-NOT: "class2"18# CHECK-NOT: "class3"19# CHECK: DW_TAG_subprogram20# CHECK: DW_AT_name{{.*}}"foo1"21# CHECK: DW_AT_low_pc{{.*}}0x000000000000100022# CHECK: DW_AT_high_pc{{.*}}0x000000000000101023# CHECK: DW_AT_type{{.*}}"class1"24# CHECK-NOT: DW_TAG_subprogram25# CHECK-NOT: "foo2"26 27 28--- !ELF29FileHeader:30 Class: ELFCLASS6431 Data: ELFDATA2LSB32 Type: ET_REL33 Machine: EM_X86_6434Sections:35 - Name: .text36 Type: SHT_PROGBITS37 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]38 Address: 0x100039 Size: 0x1b40DWARF:41 debug_abbrev:42 - Table:43 - Tag: DW_TAG_compile_unit44 Children: DW_CHILDREN_yes45 Attributes:46 - Attribute: DW_AT_producer47 Form: DW_FORM_string48 - Attribute: DW_AT_language49 Form: DW_FORM_data250 - Attribute: DW_AT_name51 Form: DW_FORM_string52 - Attribute: DW_AT_low_pc53 Form: DW_FORM_addr54 - Attribute: DW_AT_high_pc55 Form: DW_FORM_data856 - Tag: DW_TAG_subprogram57 Children: DW_CHILDREN_no58 Attributes:59 - Attribute: DW_AT_name60 Form: DW_FORM_string61 - Attribute: DW_AT_low_pc62 Form: DW_FORM_addr63 - Attribute: DW_AT_high_pc64 Form: DW_FORM_data865 - Attribute: DW_AT_type66 Form: DW_FORM_ref467 - Tag: DW_TAG_class_type68 Children: DW_CHILDREN_yes69 Attributes:70 - Attribute: DW_AT_name71 Form: DW_FORM_string72 - Tag: DW_TAG_member73 Children: DW_CHILDREN_no74 Attributes:75 - Attribute: DW_AT_type76 Form: DW_FORM_ref477 - Attribute: DW_AT_name78 Form: DW_FORM_string79 - Tag: DW_TAG_class_type80 Children: DW_CHILDREN_no81 Attributes:82 - Attribute: DW_AT_name83 Form: DW_FORM_string84 - Attribute: DW_AT_declaration85 Form: DW_FORM_flag_present86 - Tag: DW_TAG_class_type87 Children: DW_CHILDREN_yes88 Attributes:89 - Attribute: DW_AT_name90 Form: DW_FORM_string91 - Attribute: DW_AT_declaration92 Form: DW_FORM_flag_present93 - Tag: DW_TAG_template_type_parameter94 Children: DW_CHILDREN_no95 Attributes:96 - Attribute: DW_AT_type97 Form: DW_FORM_ref498 - Tag: DW_TAG_base_type99 Children: DW_CHILDREN_no100 Attributes:101 - Attribute: DW_AT_name102 Form: DW_FORM_string103 debug_info:104 - Version: 4105 Entries:106 - AbbrCode: 1107 Values:108 - CStr: by_hand109 - Value: 0x04110 - CStr: CU1111 - Value: 0x1000112 - Value: 0x1b113 - AbbrCode: 3114 Values:115 - CStr: class1116 - AbbrCode: 4117 Values:118 - Value: 0x0000006c119 - CStr: member1120 - AbbrCode: 0121 - AbbrCode: 3122 Values:123 - CStr: class2124 - AbbrCode: 4125 Values:126 - Value: 0x0000006c127 - CStr: member1128 - AbbrCode: 0129 - AbbrCode: 3130 Values:131 - CStr: class3132 - AbbrCode: 4133 Values:134 - Value: 0x0000006c135 - CStr: member1136 - AbbrCode: 0137 - AbbrCode: 8138 Values:139 - CStr: int140 - AbbrCode: 2141 Values:142 - CStr: foo1143 - Value: 0x1000144 - Value: 0x10145 - Value: 0x0000002a146 - AbbrCode: 2147 Values:148 - CStr: foo2149 - Value: 0xFFFFFFFFFFFFFFFF150 - Value: 0x100151 - Value: 0x00000040152 - AbbrCode: 0153...154