1 ## This test checks DWARFv4 DW_MACINFO_start_file
2 ## , DW_MACINFO_end_file, DW_MACINFO_define,
3 ## DW_MACINFO_UNDEF attributes.
5 # RUN: yaml2obj %s -o %t.o
6 # RUN: llvm-dwarfutil %t.o %t1
7 # RUN: llvm-dwarfdump --verify %t1 | FileCheck --check-prefix=VERIFY %s
8 # RUN: llvm-dwarfdump -a %t1 | FileCheck %s
10 # RUN: llvm-dwarfutil --linker llvm %t.o %t1
11 # RUN: llvm-dwarfdump --verify %t1 | FileCheck --check-prefix=VERIFY %s
12 # RUN: llvm-dwarfdump -a %t1 | FileCheck %s
16 ## Content: "03000201064400020744000400":
18 ## .byte 3 # DW_MACINFO_start_file
19 ## .byte 0 # Line Number
20 ## .byte 2 # File Number
21 ## .byte 1 # DW_MACINFO_define
22 ## .byte 6 # Line Number
23 ## .asciz "D" # Macro String
24 ## .byte 2 # DW_MACINFO_undef
25 ## .byte 7 # Line Number
26 ## .asciz "D" # Macro String
27 ## .byte 4 # DW_MACINFO_end_file
28 ## .byte 0 # End Of Macro List Mark
30 #CHECK: .debug_info contents:
31 #CHECK: DW_TAG_compile_unit
32 #CHECK: DW_AT_name ("CU1")
33 #CHECK: DW_AT_macro_info (0x00000000)
34 #CHECK: .debug_macinfo contents:
36 #CHECK: DW_MACINFO_start_file - lineno: 0 filenum: 2
37 #CHECK: DW_MACINFO_define - lineno: 6 macro: D
38 #CHECK: DW_MACINFO_undef - lineno: 7 macro: D
39 #CHECK: DW_MACINFO_end_file
50 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
53 - Name: .debug_macinfo
56 Content: "03000201064400020744000400"
60 - Tag: DW_TAG_compile_unit
61 Children: DW_CHILDREN_yes
63 - Attribute: DW_AT_producer
65 - Attribute: DW_AT_language
67 - Attribute: DW_AT_name
69 - Attribute: DW_AT_low_pc
71 - Attribute: DW_AT_high_pc
73 - Attribute: DW_AT_macro_info
74 Form: DW_FORM_sec_offset
75 - Tag: DW_TAG_class_type
76 Children: DW_CHILDREN_yes
78 - Attribute: DW_AT_name
81 Children: DW_CHILDREN_no
83 - Attribute: DW_AT_type
85 - Attribute: DW_AT_name
87 - Tag: DW_TAG_class_type
88 Children: DW_CHILDREN_no
90 - Attribute: DW_AT_name
92 - Attribute: DW_AT_declaration
93 Form: DW_FORM_flag_present
94 - Tag: DW_TAG_class_type
95 Children: DW_CHILDREN_yes
97 - Attribute: DW_AT_name
99 - Attribute: DW_AT_declaration
100 Form: DW_FORM_flag_present
101 - Tag: DW_TAG_template_type_parameter
102 Children: DW_CHILDREN_no
104 - Attribute: DW_AT_type
106 - Tag: DW_TAG_base_type
107 Children: DW_CHILDREN_no
109 - Attribute: DW_AT_name
111 - Tag: DW_TAG_pointer_type
112 Children: DW_CHILDREN_no
114 - Attribute: DW_AT_type
116 - Tag: DW_TAG_variable
117 Children: DW_CHILDREN_no
119 - Attribute: DW_AT_name
121 - Attribute: DW_AT_const_value
123 - Attribute: DW_AT_type
125 - Tag: DW_TAG_subprogram
126 Children: DW_CHILDREN_no
128 - Attribute: DW_AT_name
130 - Attribute: DW_AT_low_pc
132 - Attribute: DW_AT_high_pc
134 - Attribute: DW_AT_type