1; It is unclear if the GNU .debug_macro extension is well-specified for split 2; DWARF. For now, verify that a .debug_macinfo.dwo section is emitted when 3; -gdwarf-4 -gsplit-dwarf -fdebug-macro is specified, regardless of the GNU 4; extension being requested. 5 6; RUN: llc -dwarf-version=4 -O0 -filetype=obj -use-gnu-debug-macro \ 7; RUN: -split-dwarf-file=foo.dwo < %s | llvm-dwarfdump -v - | FileCheck %s 8 9; CHECK: .debug_info.dwo contents: 10; CHECK: DW_AT_macro_info [DW_FORM_sec_offset] (0x00000000) 11 12; CHECK-LABEL: .debug_macinfo.dwo contents: 13; CHECK-NEXT: 0x00000000: 14; CHECK-NEXT: DW_MACINFO_start_file - lineno: 0 filenum: 1 15; CHECK-NEXT: DW_MACINFO_start_file - lineno: 1 filenum: 2 16; CHECK-NEXT: DW_MACINFO_define - lineno: 1 macro: FOO 5 17; CHECK-NEXT: DW_MACINFO_end_file 18; CHECK-NEXT: DW_MACINFO_start_file - lineno: 2 filenum: 3 19; CHECK-NEXT: DW_MACINFO_undef - lineno: 14 macro: YEA 20; CHECK-NEXT: DW_MACINFO_end_file 21; CHECK-NEXT: DW_MACINFO_undef - lineno: 14 macro: YEA 22; CHECK-NEXT: DW_MACINFO_end_file 23 24; ModuleID = 'test.c' 25source_filename = "test.c" 26target datalayout = "e-m:e-p200:32:32-p201:32:32-p202:64:64-i64:64-f80:128-n8:16:32:64-S128" 27target triple = "x86_64-unknown-linux-gnu" 28 29!llvm.dbg.cu = !{!0} 30!llvm.module.flags = !{!14, !15, !16} 31!llvm.ident = !{!17} 32 33!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 10.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, macros: !3, splitDebugInlining: false, nameTableKind: None) 34!1 = !DIFile(filename: "test.c", directory: "/home/") 35!2 = !{} 36!3 = !{!4} 37!4 = !DIMacroFile(file: !1, nodes: !5) 38!5 = !{!6, !10, !13} 39!6 = !DIMacroFile(line: 1, file: !7, nodes: !8) 40!7 = !DIFile(filename: "./foo.h", directory: "/home/") 41!8 = !{!9} 42!9 = !DIMacro(type: DW_MACINFO_define, line: 1, name: "FOO", value: "5") 43!10 = !DIMacroFile(line: 2, file: !11, nodes: !12) 44!11 = !DIFile(filename: "./bar.h", directory: "/home/") 45!12 = !{!13} 46!13 = !DIMacro(type: DW_MACINFO_undef, line: 14, name: "YEA") 47!14 = !{i32 7, !"Dwarf Version", i32 4} 48!15 = !{i32 2, !"Debug Info Version", i32 3} 49!16 = !{i32 1, !"wchar_size", i32 4} 50!17 = !{!"clang version 10.0.0"} 51