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