brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.0 KiB · 459ae54 Raw
79 lines · plain
1; RUN: llc -O0 -split-dwarf-file=foo.dwo -filetype=obj < %s | llvm-dwarfdump --debug-info --debug-macro - | FileCheck %s2 3; CHECK:.debug_info.dwo contents:4; CHECK:     DW_TAG_compile_unit5; CHECK-NOT:   DW_TAG6; CHECK:       DW_AT_GNU_dwo_name ("foo.dwo")7; CHECK-NOT:   DW_TAG8; CHECK:       DW_AT_macro_info  (0x00000000)9 10;CHECK-LABEL:.debug_macinfo.dwo contents:11;CHECK-NEXT: 0x00000000:12;CHECK-NEXT:  DW_MACINFO_start_file - lineno: 0 filenum: 113;CHECK-NEXT:    DW_MACINFO_start_file - lineno: 1 filenum: 214;CHECK-NEXT:      DW_MACINFO_define - lineno: 1 macro: define_1 1215;CHECK-NEXT:    DW_MACINFO_end_file16;CHECK-NEXT:    DW_MACINFO_start_file - lineno: 2 filenum: 317;CHECK-NEXT:      DW_MACINFO_define - lineno: 1 macro: define_2 1418;CHECK-NEXT:    DW_MACINFO_end_file19;CHECK-NEXT:  DW_MACINFO_end_file20;CHECK-NEXT:  DW_MACINFO_define - lineno: 0 macro: __llvm__ 121;CHECK-NEXT:  DW_MACINFO_define - lineno: 0 macro: __clang__ 122;CHECK-NEXT:  DW_MACINFO_define - lineno: 0 macro: __clang_major__ 1023;CHECK-NEXT:  DW_MACINFO_define - lineno: 0 macro: __clang_minor__ 024;CHECK-NEXT:  DW_MACINFO_define - lineno: 0 macro: __clang_patchlevel__ 025;CHECK-NEXT:  DW_MACINFO_define - lineno: 0 macro: __clang_version__ 10.0.026;CHECK-NEXT:  DW_MACINFO_define - lineno: 0 macro: __GNUC__ 427 28; ModuleID = 'debug-macro-split-dwarf.c'29source_filename = "debug-macro-split-dwarf.c"30target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"31target triple = "x86_64-unknown-linux-gnu"32; Function Attrs: noinline nounwind optnone uwtable33define dso_local void @foo() #0 !dbg !25 {34entry:35  ret void, !dbg !3436}37; Function Attrs: nounwind readnone speculatable willreturn38declare void @llvm.dbg.declare(metadata, metadata, metadata) #139 40attributes #0 = { noinline nounwind optnone uwtable }41attributes #1 = { nounwind readnone speculatable willreturn }42 43!llvm.dbg.cu = !{!0}44!llvm.module.flags = !{!21, !22, !23}45!llvm.ident = !{!24}46 47!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 10.0.0", isOptimized: false, runtimeVersion: 0, splitDebugFilename: "debug-macro-split-dwarf.dwo", emissionKind: FullDebug, enums: !2, macros: !3, nameTableKind: GNU)48!1 = !DIFile(filename: "debug-macro-split-dwarf.c", directory: "/", checksumkind: CSK_MD5, checksum: "e74d0fa8f714535c1bac6da2ffbbd898")49!2 = !{}50!3 = !{!4, !14, !15, !16, !17, !18, !19, !20}51!4 = !DIMacroFile(file: !1, nodes: !5)52!5 = !{!6, !10}53!6 = !DIMacroFile(line: 1, file: !7, nodes: !8)54!7 = !DIFile(filename: "./1.h", directory: "/", checksumkind: CSK_MD5, checksum: "6185a3a5ae6eb7d1fd2692718f9d95e5")55!8 = !{!9}56!9 = !DIMacro(type: DW_MACINFO_define, line: 1, name: "define_1", value: "12")57!10 = !DIMacroFile(line: 2, file: !11, nodes: !12)58!11 = !DIFile(filename: "./2.h", directory: "/", checksumkind: CSK_MD5, checksum: "d48d124c86c1b50a32517884ff962f83")59!12 = !{!13}60!13 = !DIMacro(type: DW_MACINFO_define, line: 1, name: "define_2", value: "14")61!14 = !DIMacro(type: DW_MACINFO_define, name: "__llvm__", value: "1")62!15 = !DIMacro(type: DW_MACINFO_define, name: "__clang__", value: "1")63!16 = !DIMacro(type: DW_MACINFO_define, name: "__clang_major__", value: "10")64!17 = !DIMacro(type: DW_MACINFO_define, name: "__clang_minor__", value: "0")65!18 = !DIMacro(type: DW_MACINFO_define, name: "__clang_patchlevel__", value: "0")66!19 = !DIMacro(type: DW_MACINFO_define, name: "__clang_version__", value: "10.0.0")67!20 = !DIMacro(type: DW_MACINFO_define, name: "__GNUC__", value: "4")68!21 = !{i32 7, !"Dwarf Version", i32 4}69!22 = !{i32 2, !"Debug Info Version", i32 3}70!23 = !{i32 1, !"wchar_size", i32 4}71!24 = !{!"clang version 10.0.0 "}72!25 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 4, type: !26, scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)73!26 = !DISubroutineType(types: !27)74!27 = !{null}75!30 = !DILocation(line: 4, column: 14, scope: !25)76!32 = !DILocation(line: 4, column: 21, scope: !25)77!33 = !DILocation(line: 5, column: 4, scope: !25)78!34 = !DILocation(line: 6, column: 1, scope: !25)79