1 ## Test that DWARFv5 DW_FORM_implicit_const is correctly recognized
2 ## and copied into the result.
4 # RUN: yaml2obj %s -o %t.o
6 # RUN: llvm-dwarfutil %t.o %t1
7 # RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
8 # RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
10 # RUN: llvm-dwarfutil --linker parallel %t.o %t1
11 # RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
12 # RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
14 # RUN: llvm-dwarfutil --no-garbage-collection %t.o %t1
15 # RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
16 # RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
18 # RUN: llvm-dwarfutil --linker parallel --no-garbage-collection %t.o %t1
19 # RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
20 # RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
22 # RUN: llvm-dwarfutil --no-garbage-collection --build-accelerator=DWARF %t.o %t1
23 # RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
24 # RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
26 # RUN: llvm-dwarfutil --linker parallel --no-garbage-collection --build-accelerator=DWARF %t.o %t1
27 # RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
28 # RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
30 #VERIFY-CHECK: No errors.
33 #CHECK: DW_TAG_compile_unit
34 #CHECK: DW_TAG_subprogram
35 #CHECK: DW_TAG_base_type
36 #CHECK: DW_TAG_variable
38 #CHECK: DW_AT_const_value DW_FORM_implicit_const 33
40 #CHECK: DW_TAG_compile_unit
41 #CHECK: DW_AT_name {{.*}}"CU1"
44 #CHECK: DW_TAG_subprogram
45 #CHECK: DW_AT_name {{.*}}"foo1"
48 #CHECK: DW_TAG_variable
49 #CHECK: DW_AT_name {{.*}}"var1"
50 #CHECK: DW_AT_const_value [DW_FORM_implicit_const] (33)
51 #CHECK: DW_AT_type {{.*}}"int"
62 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
68 - Tag: DW_TAG_compile_unit
69 Children: DW_CHILDREN_yes
71 - Attribute: DW_AT_producer
73 - Attribute: DW_AT_language
75 - Attribute: DW_AT_name
77 - Attribute: DW_AT_low_pc
79 - Attribute: DW_AT_high_pc
81 - Attribute: DW_AT_addr_base
82 Form: DW_FORM_sec_offset
83 - Tag: DW_TAG_subprogram
84 Children: DW_CHILDREN_yes
86 - Attribute: DW_AT_name
88 - Attribute: DW_AT_low_pc
90 - Attribute: DW_AT_high_pc
92 - Attribute: DW_AT_type
94 - Tag: DW_TAG_base_type
95 Children: DW_CHILDREN_no
97 - Attribute: DW_AT_name
99 - Tag: DW_TAG_variable
100 Children: DW_CHILDREN_no
102 - Attribute: DW_AT_name
104 - Attribute: DW_AT_const_value
105 Form: DW_FORM_implicit_const
107 - Attribute: DW_AT_type
111 UnitType: DW_UT_compile