Duncan P. N. Exon Smith | 47d82981 | 2015-01-14 01:20:27 +0000 | [diff] [blame] | 1 | ; RUN: llvm-link %s %S/Inputs/mdlocation.ll -o - -S | FileCheck %s |
| 2 | |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 3 | ; Test that DILocations are remapped properly. |
Duncan P. N. Exon Smith | 47d82981 | 2015-01-14 01:20:27 +0000 | [diff] [blame] | 4 | |
Duncan P. N. Exon Smith | 814b8e9 | 2015-08-28 20:26:49 +0000 | [diff] [blame] | 5 | ; 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 Smith | 47d82981 | 2015-01-14 01:20:27 +0000 | [diff] [blame] | 7 | |
Duncan P. N. Exon Smith | 814b8e9 | 2015-08-28 20:26:49 +0000 | [diff] [blame] | 8 | ; CHECK: !0 = distinct !DISubprogram( |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 9 | ; 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 Smith | 814b8e9 | 2015-08-28 20:26:49 +0000 | [diff] [blame] | 12 | ; 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 Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 21 | !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 Smith | a5a0f57 | 2015-01-14 01:29:32 +0000 | [diff] [blame] | 24 | ; Test distinct nodes. |
Duncan P. N. Exon Smith | 814b8e9 | 2015-08-28 20:26:49 +0000 | [diff] [blame] | 25 | !4 = distinct !DILocation(line: 3, column: 7, scope: !0) |
| 26 | !5 = distinct !DILocation(line: 3, column: 7, scope: !0, inlinedAt: !4) |
Adrian Prantl | 115edca | 2016-04-11 20:58:57 +0000 | [diff] [blame^] | 27 | |
| 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") |