• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -analyze -module-debuginfo -enable-new-pm=0 < %s | FileCheck %s
2; RUN: opt -passes='print<module-debuginfo>' -disable-output 2>&1 < %s \
3; RUN:   | FileCheck %s
4
5; Verify that both compile units, even though one compile units's functions
6; were entirely inlined into the other.
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
12define void @f() !dbg !4 {
13  ret void, !dbg !15
14}
15
16!llvm.dbg.cu = !{!0, !8}
17!llvm.module.flags = !{!13, !16}
18
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, inlinedAt: !14)
33!16 = !{i32 1, !"Debug Info Version", i32 3}
34