2010-05-10-MultipleCU.ll 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ; REQUIRES: object-emission
  2. ; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s
  3. ; Check that two compile units are generated
  4. ; CHECK: Compile Unit:
  5. ; CHECK: Compile Unit:
  6. define i32 @foo() nounwind readnone ssp !dbg !2 {
  7. return:
  8. ret i32 42, !dbg !0
  9. }
  10. define i32 @bar() nounwind readnone ssp !dbg !10 {
  11. return:
  12. ret i32 21, !dbg !8
  13. }
  14. !llvm.dbg.cu = !{!4, !12}
  15. !llvm.module.flags = !{!21}
  16. !16 = !{!2}
  17. !17 = !{!10}
  18. !0 = !DILocation(line: 3, scope: !1)
  19. !1 = distinct !DILexicalBlock(line: 2, column: 0, file: !18, scope: !2)
  20. !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)
  21. !3 = !DIFile(filename: "a.c", directory: "/tmp/")
  22. !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)
  23. !5 = !DISubroutineType(types: !6)
  24. !6 = !{!7}
  25. !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
  26. !8 = !DILocation(line: 3, scope: !9)
  27. !9 = distinct !DILexicalBlock(line: 2, column: 0, file: !20, scope: !10)
  28. !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)
  29. !11 = !DIFile(filename: "b.c", directory: "/tmp/")
  30. !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)
  31. !13 = !DISubroutineType(types: !14)
  32. !14 = !{!15}
  33. !15 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
  34. !18 = !DIFile(filename: "a.c", directory: "/tmp/")
  35. !19 = !{}
  36. !20 = !DIFile(filename: "b.c", directory: "/tmp/")
  37. !21 = !{i32 1, !"Debug Info Version", i32 3}