blob: 7d8d165755b5b25be515a1e9d27762c863db16af [file] [log] [blame]
Duncan P. N. Exon Smith47d829812015-01-14 01:20:27 +00001; RUN: llvm-link %s %S/Inputs/mdlocation.ll -o - -S | FileCheck %s
2
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +00003; Test that DILocations are remapped properly.
Duncan P. N. Exon Smith47d829812015-01-14 01:20:27 +00004
Duncan P. N. Exon Smith814b8e92015-08-28 20:26:49 +00005; CHECK: !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11}
6!named = !{!0, !1, !2, !3, !4, !5}
Duncan P. N. Exon Smith47d829812015-01-14 01:20:27 +00007
Duncan P. N. Exon Smith814b8e92015-08-28 20:26:49 +00008; CHECK: !0 = distinct !DISubprogram(
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +00009; CHECK-NEXT: !1 = !DILocation(line: 3, column: 7, scope: !0)
10; CHECK-NEXT: !2 = !DILocation(line: 3, column: 7, scope: !0, inlinedAt: !1)
11; CHECK-NEXT: !3 = !DILocation(line: 3, column: 7, scope: !0, inlinedAt: !2)
Duncan P. N. Exon Smith814b8e92015-08-28 20:26:49 +000012; CHECK-NEXT: !4 = distinct !DILocation(line: 3, column: 7, scope: !0)
13; CHECK-NEXT: !5 = distinct !DILocation(line: 3, column: 7, scope: !0, inlinedAt: !4)
14; CHECK-NEXT: !6 = distinct !DISubprogram(
15; CHECK-NEXT: !7 = !DILocation(line: 3, column: 7, scope: !6)
16; CHECK-NEXT: !8 = !DILocation(line: 3, column: 7, scope: !6, inlinedAt: !7)
17; CHECK-NEXT: !9 = !DILocation(line: 3, column: 7, scope: !6, inlinedAt: !8)
18; CHECK-NEXT: !10 = distinct !DILocation(line: 3, column: 7, scope: !6)
19; CHECK-NEXT: !11 = distinct !DILocation(line: 3, column: 7, scope: !6, inlinedAt: !10)
20!0 = distinct !DISubprogram() ; Use this as a scope.
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000021!1 = !DILocation(line: 3, column: 7, scope: !0)
22!2 = !DILocation(line: 3, column: 7, scope: !0, inlinedAt: !1)
23!3 = !DILocation(line: 3, column: 7, scope: !0, inlinedAt: !2)
Duncan P. N. Exon Smitha5a0f572015-01-14 01:29:32 +000024; Test distinct nodes.
Duncan P. N. Exon Smith814b8e92015-08-28 20:26:49 +000025!4 = distinct !DILocation(line: 3, column: 7, scope: !0)
26!5 = distinct !DILocation(line: 3, column: 7, scope: !0, inlinedAt: !4)
Adrian Prantl115edca2016-04-11 20:58:57 +000027
28!llvm.dbg.cu = !{!6}
29!6 = distinct !DICompileUnit(language: DW_LANG_C89, file: !7, subprograms: !{!0})
30!7 = !DIFile(filename: "source.c", directory: "/dir")