1## This test checks that llvm-dwarfdump can dump debug_macro.dwo
2## section containing DW_MACRO_*_strp forms present in a dwo object.
3
4# RUN: llvm-mc -triple x86_64-unknown-linux -filetype=obj %s -o -| \
5# RUN:   llvm-dwarfdump -debug-macro - | FileCheck -strict-whitespace -match-full-lines %s
6
7#      CHECK:.debug_macro.dwo contents:
8# CHECK-NEXT:0x00000000:
9# CHECK-NEXT:macro header: version = 0x0005, flags = 0x02, format = DWARF32, debug_line_offset = 0x00000000
10# CHECK-NEXT:DW_MACRO_start_file - lineno: 0 filenum: 0
11# CHECK-NEXT:  DW_MACRO_define_strp - lineno: 1 macro: DWARF_VERSION 5
12# CHECK-NEXT:  DW_MACRO_undef_strp - lineno: 4 macro: DWARF_VERSION
13# CHECK-NEXT:DW_MACRO_end_file
14
15	.section	.debug_macro.dwo,"e",@progbits
16.Lcu_macro_begin0:
17	.short	5                      # Macro information version
18	.byte	2                       # Flags: 32 bit, debug_line_offset present
19	.long	0                       # debug_line_offset
20	.byte	3                       # DW_MACRO_start_file
21	.byte	0                       # Line Number
22	.byte	0                       # File Number
23	.byte	5                       # DW_MACRO_define_strp
24	.byte	1                       # Line Number
25	.long	.Linfo_string0-.debug_str.dwo   # Macro String
26	.byte	6                       # DW_MACRO_undef_strp
27	.byte	4                       # Line Number
28	.long	.Linfo_string1-.debug_str.dwo   # Macro String
29	.byte	4                       # DW_MACRO_end_file
30	.byte	0                       # End Of Macro List Mark
31
32	.section	.debug_str.dwo,"eMS",@progbits,1
33.Linfo_string0:
34	.asciz	"DWARF_VERSION 5"
35.Linfo_string1:
36	.asciz	"DWARF_VERSION"
37