debuginfofinder-multiple-cu.ll 1.8 KB

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