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