1; REQUIRES: object-emission 2 3; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s 4 5; Check that two compile units are generated 6 7; CHECK: Compile Unit: 8; CHECK: Compile Unit: 9 10define i32 @foo() nounwind readnone ssp { 11return: 12 ret i32 42, !dbg !0 13} 14 15define i32 @bar() nounwind readnone ssp { 16return: 17 ret i32 21, !dbg !8 18} 19 20!llvm.dbg.cu = !{!4, !12} 21!llvm.module.flags = !{!21} 22!16 = !{!2} 23!17 = !{!10} 24 25!0 = !MDLocation(line: 3, scope: !1) 26!1 = distinct !MDLexicalBlock(line: 2, column: 0, file: !18, scope: !2) 27!2 = !MDSubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !18, scope: !3, type: !5, function: i32 ()* @foo) 28!3 = !MDFile(filename: "a.c", directory: "/tmp/") 29!4 = !MDCompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: 0, file: !18, enums: !19, retainedTypes: !19, subprograms: !16) 30!5 = !MDSubroutineType(types: !6) 31!6 = !{!7} 32!7 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 33!8 = !MDLocation(line: 3, scope: !9) 34!9 = distinct !MDLexicalBlock(line: 2, column: 0, file: !20, scope: !10) 35!10 = !MDSubprogram(name: "bar", linkageName: "bar", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !20, scope: !11, type: !13, function: i32 ()* @bar) 36!11 = !MDFile(filename: "b.c", directory: "/tmp/") 37!12 = !MDCompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: 0, file: !20, enums: !19, retainedTypes: !19, subprograms: !17) 38!13 = !MDSubroutineType(types: !14) 39!14 = !{!15} 40!15 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 41!18 = !MDFile(filename: "a.c", directory: "/tmp/") 42!19 = !{} 43!20 = !MDFile(filename: "b.c", directory: "/tmp/") 44!21 = !{i32 1, !"Debug Info Version", i32 3} 45