1; RUN: opt -passes='print<module-debuginfo>' -disable-output 2>&1 < %s \ 2; RUN: | FileCheck %s 3 4; Produced from linking: 5; /tmp/test1.c containing f() 6; /tmp/test2.c containing g() 7 8; Verify that both compile units and both their contained functions are 9; listed by DebugInfoFinder: 10;CHECK: Compile unit: DW_LANG_C99 from /tmp/test1.c 11;CHECK: Compile unit: DW_LANG_C99 from /tmp/test2.c 12;CHECK: Subprogram: f from /tmp/test1.c:1 13;CHECK: Subprogram: g from /tmp/test2.c:1 14 15define void @f() !dbg !4 { 16 ret void, !dbg !14 17} 18 19define void @g() !dbg !11 { 20 ret void, !dbg !15 21} 22 23!llvm.dbg.cu = !{!0, !8} 24!llvm.module.flags = !{!13, !16} 25 26!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) 27!1 = !DIFile(filename: "test1.c", directory: "/tmp") 28!2 = !{} 29!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) 30!5 = !DIFile(filename: "test1.c", directory: "/tmp") 31!6 = !DISubroutineType(types: !7) 32!7 = !{null} 33!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) 34!9 = !DIFile(filename: "test2.c", directory: "/tmp") 35!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) 36!12 = !DIFile(filename: "test2.c", directory: "/tmp") 37!13 = !{i32 2, !"Dwarf Version", i32 4} 38!14 = !DILocation(line: 1, scope: !4) 39!15 = !DILocation(line: 1, scope: !11) 40!16 = !{i32 1, !"Debug Info Version", i32 3} 41