1 ; RUN: llc %s -o %t -filetype=obj 2 ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s 3 ; CHECK: DW_TAG_compile_unit 4 ; CHECK: DW_TAG_subprogram 5 ; CHECK: DW_AT_name{{.*}}"f" 6 ; CHECK-NOT: DW_TAG_compile_unit 7 ; 8 ; created from 9 ; void f() {} // compile with -g 10 ; void g() {} // compile with -Rpass=inline 11 ; and llvm-linking the result. 12 13 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" 14 target triple = "x86_64-apple-macosx10.11.0" 15 16 ; Function Attrs: nounwind ssp uwtable 17 define void @f() #0 !dbg !4 { 18 entry: 19 ret void, !dbg !15 20 } 21 22 ; Function Attrs: nounwind ssp uwtable 23 define void @g() #0 !dbg !9 { 24 entry: 25 ret void, !dbg !16 26 } 27 28 attributes #0 = { nounwind ssp uwtable } 29 30 !llvm.dbg.cu = !{!0, !7} 31 !llvm.ident = !{!11, !11} 32 !llvm.module.flags = !{!12, !13, !14} 33 34 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 265328) (llvm/trunk 265330)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) 35 !1 = !DIFile(filename: "test.c", directory: "/Volumes/Data/llvm") 36 !2 = !{} 37 !4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, variables: !2) 38 !5 = !DISubroutineType(types: !6) 39 !6 = !{null} 40 !7 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 265328) (llvm/trunk 265330)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2) 41 !9 = distinct !DISubprogram(name: "g", scope: !1, file: !1, line: 1, type: !10, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !7, variables: !2) 42 !10 = !DISubroutineType(types: !2) 43 !11 = !{!"clang version 3.9.0 (trunk 265328) (llvm/trunk 265330)"} 44 !12 = !{i32 2, !"Dwarf Version", i32 2} 45 !13 = !{i32 2, !"Debug Info Version", i32 3} 46 !14 = !{i32 1, !"PIC Level", i32 2} 47 !15 = !DILocation(line: 1, column: 12, scope: !4) 48 !16 = !DILocation(line: 1, column: 12, scope: !9) 49