1 ; RUN: opt -analyze -module-debuginfo < %s | FileCheck %s 2 3 ; Verify that both compile units, even though one compile units's functions 4 ; were entirely inlined into the other. 5 ;CHECK: Compile unit: DW_LANG_C99 from /tmp/test1.c 6 ;CHECK: Compile unit: DW_LANG_C99 from /tmp/test2.c 7 ;CHECK: Subprogram: f from /tmp/test1.c:1 8 ;CHECK: Subprogram: g from /tmp/test2.c:1 9 10 define void @f() !dbg !4 { 11 ret void, !dbg !15 12 } 13 14 !llvm.dbg.cu = !{!0, !8} 15 !llvm.module.flags = !{!13, !16} 16 17 !0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (192092)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) 18 !1 = !DIFile(filename: "test1.c", directory: "/tmp") 19 !2 = !{} 20 !4 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, retainedNodes: !2) 21 !5 = !DIFile(filename: "test1.c", directory: "/tmp") 22 !6 = !DISubroutineType(types: !7) 23 !7 = !{null} 24 !8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (192092)", isOptimized: false, emissionKind: FullDebug, file: !9, enums: !2, retainedTypes: !2, globals: !2, imports: !2) 25 !9 = !DIFile(filename: "test2.c", directory: "/tmp") 26 !11 = distinct !DISubprogram(name: "g", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !8, scopeLine: 1, file: !9, scope: !12, type: !6, retainedNodes: !2) 27 !12 = !DIFile(filename: "test2.c", directory: "/tmp") 28 !13 = !{i32 2, !"Dwarf Version", i32 4} 29 !14 = !DILocation(line: 1, scope: !4) 30 !15 = !DILocation(line: 1, scope: !11, inlinedAt: !14) 31 !16 = !{i32 1, !"Debug Info Version", i32 3} 32