xref: /llvm-project/llvm/test/tools/llvm-dwarfutil/ELF/X86/gc-default.test (revision f1fdfe6888f93b9f6dfb4689e1f3206de584ff5b)
14539b441SAlexey Lapshin## This test checks that debug info related to deleted code (marked with
24539b441SAlexey Lapshin## default tombstone value) is removed.
34539b441SAlexey Lapshin
44539b441SAlexey Lapshin# RUN: yaml2obj %s -o %t.o
54539b441SAlexey Lapshin
6b61ac4a8Savl-llvm# RUN: llvm-dwarfutil --no-odr %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
74539b441SAlexey Lapshin
8*f1fdfe68SAlexey Lapshin# RUN: llvm-dwarfutil --no-odr --linker classic %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
936f35109SAlexey Lapshin
10*f1fdfe68SAlexey Lapshin# RUN: llvm-dwarfutil --no-odr --linker parallel %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
115f2a7fa6SAlexey Lapshin
12b61ac4a8Savl-llvm# RUN: llvm-dwarfutil --no-odr --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
134539b441SAlexey Lapshin
14b61ac4a8Savl-llvm# RUN: llvm-dwarfutil --no-odr --no-garbage-collection --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
154539b441SAlexey Lapshin
16b61ac4a8Savl-llvm# RUN: llvm-dwarfutil --no-odr --garbage-collection --no-garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-NOGC
174539b441SAlexey Lapshin
18*f1fdfe68SAlexey Lapshin# RUN: llvm-dwarfutil --no-odr --linker parallel --garbage-collection --no-garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-NOGC
195f2a7fa6SAlexey Lapshin
20b61ac4a8Savl-llvm# RUN: llvm-dwarfutil --no-odr %t.o --tombstone=universal - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
214539b441SAlexey Lapshin
22*f1fdfe68SAlexey Lapshin# RUN: llvm-dwarfutil --no-odr --linker parallel %t.o --tombstone=universal - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
235f2a7fa6SAlexey Lapshin
244539b441SAlexey Lapshin# CHECK: DW_TAG_compile_unit
254539b441SAlexey Lapshin# CHECK: DW_AT_name{{.*}}"CU1"
264539b441SAlexey Lapshin# CHECK: DW_TAG_class_type
274539b441SAlexey Lapshin# CHECK: DW_AT_name{{.*}}"class1"
284539b441SAlexey Lapshin# CHECK-GC-NOT: DW_TAG_class_type
294539b441SAlexey Lapshin# CHECK-GC-NOT: "class2"
304539b441SAlexey Lapshin# CHECK-GC-NOT: "class3"
314539b441SAlexey Lapshin# CHECK-NOGC: DW_TAG_class_type
324539b441SAlexey Lapshin# CHECK-NOGC: "class2"
334539b441SAlexey Lapshin# CHECK-NOGC: "class3"
344539b441SAlexey Lapshin# CHECK: DW_TAG_subprogram
354539b441SAlexey Lapshin# CHECK: DW_AT_name{{.*}}"foo1"
364539b441SAlexey Lapshin# CHECK: DW_AT_low_pc{{.*}}0x0000000000001000
374539b441SAlexey Lapshin# CHECK: DW_AT_high_pc{{.*}}0x0000000000001010
384539b441SAlexey Lapshin# CHECK: DW_AT_type{{.*}}"class1"
394539b441SAlexey Lapshin# CHECK-GC-NOT: DW_TAG_subprogram
404539b441SAlexey Lapshin# CHECK-GC-NOT: "foo2"
414539b441SAlexey Lapshin# CHECK-NOGC: DW_TAG_subprogram
424539b441SAlexey Lapshin# CHECK-NOGC: "foo2"
434539b441SAlexey Lapshin
444539b441SAlexey Lapshin
454539b441SAlexey Lapshin--- !ELF
464539b441SAlexey LapshinFileHeader:
474539b441SAlexey Lapshin  Class:    ELFCLASS64
484539b441SAlexey Lapshin  Data:     ELFDATA2LSB
494539b441SAlexey Lapshin  Type:     ET_REL
504539b441SAlexey Lapshin  Machine:  EM_X86_64
514539b441SAlexey LapshinSections:
524539b441SAlexey Lapshin  - Name:            .text
534539b441SAlexey Lapshin    Type:            SHT_PROGBITS
544539b441SAlexey Lapshin    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
554539b441SAlexey Lapshin    Address:         0x1000
564539b441SAlexey Lapshin    Size:            0x1b
574539b441SAlexey LapshinDWARF:
584539b441SAlexey Lapshin  debug_abbrev:
594539b441SAlexey Lapshin    - Table:
604539b441SAlexey Lapshin      - Tag:      DW_TAG_compile_unit
614539b441SAlexey Lapshin        Children: DW_CHILDREN_yes
624539b441SAlexey Lapshin        Attributes:
634539b441SAlexey Lapshin          - Attribute: DW_AT_producer
644539b441SAlexey Lapshin            Form:      DW_FORM_string
654539b441SAlexey Lapshin          - Attribute: DW_AT_language
664539b441SAlexey Lapshin            Form:      DW_FORM_data2
674539b441SAlexey Lapshin          - Attribute: DW_AT_name
684539b441SAlexey Lapshin            Form:      DW_FORM_string
694539b441SAlexey Lapshin          - Attribute: DW_AT_low_pc
704539b441SAlexey Lapshin            Form:      DW_FORM_addr
714539b441SAlexey Lapshin          - Attribute: DW_AT_high_pc
724539b441SAlexey Lapshin            Form:      DW_FORM_data8
734539b441SAlexey Lapshin      - Tag:      DW_TAG_subprogram
744539b441SAlexey Lapshin        Children: DW_CHILDREN_no
754539b441SAlexey Lapshin        Attributes:
764539b441SAlexey Lapshin          - Attribute: DW_AT_name
774539b441SAlexey Lapshin            Form:      DW_FORM_string
784539b441SAlexey Lapshin          - Attribute: DW_AT_low_pc
794539b441SAlexey Lapshin            Form:      DW_FORM_addr
804539b441SAlexey Lapshin          - Attribute: DW_AT_high_pc
814539b441SAlexey Lapshin            Form:      DW_FORM_data8
824539b441SAlexey Lapshin          - Attribute: DW_AT_type
834539b441SAlexey Lapshin            Form:      DW_FORM_ref4
844539b441SAlexey Lapshin      - Tag:      DW_TAG_class_type
854539b441SAlexey Lapshin        Children: DW_CHILDREN_yes
864539b441SAlexey Lapshin        Attributes:
874539b441SAlexey Lapshin          - Attribute: DW_AT_name
884539b441SAlexey Lapshin            Form:      DW_FORM_string
894539b441SAlexey Lapshin      - Tag:      DW_TAG_member
904539b441SAlexey Lapshin        Children: DW_CHILDREN_no
914539b441SAlexey Lapshin        Attributes:
924539b441SAlexey Lapshin          - Attribute: DW_AT_type
934539b441SAlexey Lapshin            Form:      DW_FORM_ref4
944539b441SAlexey Lapshin          - Attribute: DW_AT_name
954539b441SAlexey Lapshin            Form:      DW_FORM_string
964539b441SAlexey Lapshin      - Tag:      DW_TAG_class_type
974539b441SAlexey Lapshin        Children: DW_CHILDREN_no
984539b441SAlexey Lapshin        Attributes:
994539b441SAlexey Lapshin          - Attribute: DW_AT_name
1004539b441SAlexey Lapshin            Form:      DW_FORM_string
1014539b441SAlexey Lapshin          - Attribute: DW_AT_declaration
1024539b441SAlexey Lapshin            Form:      DW_FORM_flag_present
1034539b441SAlexey Lapshin      - Tag:      DW_TAG_class_type
1044539b441SAlexey Lapshin        Children: DW_CHILDREN_yes
1054539b441SAlexey Lapshin        Attributes:
1064539b441SAlexey Lapshin          - Attribute: DW_AT_name
1074539b441SAlexey Lapshin            Form:      DW_FORM_string
1084539b441SAlexey Lapshin          - Attribute: DW_AT_declaration
1094539b441SAlexey Lapshin            Form:      DW_FORM_flag_present
1104539b441SAlexey Lapshin      - Tag:      DW_TAG_template_type_parameter
1114539b441SAlexey Lapshin        Children: DW_CHILDREN_no
1124539b441SAlexey Lapshin        Attributes:
1134539b441SAlexey Lapshin          - Attribute: DW_AT_type
1144539b441SAlexey Lapshin            Form:      DW_FORM_ref4
1154539b441SAlexey Lapshin      - Tag:      DW_TAG_base_type
1164539b441SAlexey Lapshin        Children: DW_CHILDREN_no
1174539b441SAlexey Lapshin        Attributes:
1184539b441SAlexey Lapshin          - Attribute: DW_AT_name
1194539b441SAlexey Lapshin            Form:      DW_FORM_string
1204539b441SAlexey Lapshin  debug_info:
1214539b441SAlexey Lapshin    - Version: 4
1224539b441SAlexey Lapshin      Entries:
1234539b441SAlexey Lapshin        - AbbrCode: 1
1244539b441SAlexey Lapshin          Values:
1254539b441SAlexey Lapshin            - CStr: by_hand
1264539b441SAlexey Lapshin            - Value:  0x04
1274539b441SAlexey Lapshin            - CStr: CU1
1284539b441SAlexey Lapshin            - Value:  0x1000
1294539b441SAlexey Lapshin            - Value:  0x1b
1304539b441SAlexey Lapshin        - AbbrCode: 3
1314539b441SAlexey Lapshin          Values:
1324539b441SAlexey Lapshin            - CStr: class1
1334539b441SAlexey Lapshin        - AbbrCode: 4
1344539b441SAlexey Lapshin          Values:
1354539b441SAlexey Lapshin            - Value:  0x0000006c
1364539b441SAlexey Lapshin            - CStr: member1
1374539b441SAlexey Lapshin        - AbbrCode: 0
1384539b441SAlexey Lapshin        - AbbrCode: 3
1394539b441SAlexey Lapshin          Values:
1404539b441SAlexey Lapshin            - CStr: class2
1414539b441SAlexey Lapshin        - AbbrCode: 4
1424539b441SAlexey Lapshin          Values:
1434539b441SAlexey Lapshin            - Value:  0x0000006c
1444539b441SAlexey Lapshin            - CStr: member1
1454539b441SAlexey Lapshin        - AbbrCode: 0
1464539b441SAlexey Lapshin        - AbbrCode: 3
1474539b441SAlexey Lapshin          Values:
1484539b441SAlexey Lapshin            - CStr: class3
1494539b441SAlexey Lapshin        - AbbrCode: 4
1504539b441SAlexey Lapshin          Values:
1514539b441SAlexey Lapshin            - Value:  0x0000006c
1524539b441SAlexey Lapshin            - CStr: member1
1534539b441SAlexey Lapshin        - AbbrCode: 0
1544539b441SAlexey Lapshin        - AbbrCode: 8
1554539b441SAlexey Lapshin          Values:
1564539b441SAlexey Lapshin            - CStr: int
1574539b441SAlexey Lapshin        - AbbrCode: 2
1584539b441SAlexey Lapshin          Values:
1594539b441SAlexey Lapshin            - CStr: foo1
1604539b441SAlexey Lapshin            - Value:  0x1000
1614539b441SAlexey Lapshin            - Value:  0x10
1624539b441SAlexey Lapshin            - Value:  0x0000002a
1634539b441SAlexey Lapshin        - AbbrCode: 2
1644539b441SAlexey Lapshin          Values:
1654539b441SAlexey Lapshin            - CStr: foo2
1664539b441SAlexey Lapshin            - Value:  0x0
1674539b441SAlexey Lapshin            - Value:  0x100
1684539b441SAlexey Lapshin            - Value:  0x00000040
1694539b441SAlexey Lapshin        - AbbrCode: 0
1704539b441SAlexey Lapshin...
171