Duncan P. N. Exon Smith | 9dda8f5 | 2019-03-06 02:50:46 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t1 %t2 |
| 2 | |
| 3 | // Run with -verify, which onliy gets remarks from the main TU. |
| 4 | // |
| 5 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t1 \ |
| 6 | // RUN: -fdisable-module-hash -fsyntax-only -I%S/Inputs/Rmodule-import \ |
| 7 | // RUN: -Rmodule-build -Rmodule-import -verify %s |
| 8 | |
| 9 | // Run again, using FileCheck to check remarks from the module builds. |
| 10 | // |
| 11 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t2 \ |
| 12 | // RUN: -fdisable-module-hash -fsyntax-only -I%S/Inputs/Rmodule-import \ |
| 13 | // RUN: -Rmodule-build -Rmodule-import %s 2>&1 |\ |
| 14 | // RUN: FileCheck %s -implicit-check-not "remark:" |
| 15 | |
| 16 | #include "A.h" // \ |
Duncan P. N. Exon Smith | a75c4df | 2019-03-06 05:42:56 +0000 | [diff] [blame] | 17 | expected-remark-re{{building module 'A' as '{{.*[/\\]}}A.pcm'}} \ |
Duncan P. N. Exon Smith | 9dda8f5 | 2019-03-06 02:50:46 +0000 | [diff] [blame] | 18 | expected-remark{{finished building module 'A'}} \ |
Duncan P. N. Exon Smith | a75c4df | 2019-03-06 05:42:56 +0000 | [diff] [blame] | 19 | expected-remark-re{{importing module 'A' from '{{.*[/\\]}}A.pcm'}} \ |
| 20 | expected-remark-re{{importing module 'B' into 'A' from '{{.*[/\\]}}B.pcm'}} \ |
| 21 | expected-remark-re{{importing module 'C' into 'B' from '{{.*[/\\]}}C.pcm'}} |
Duncan P. N. Exon Smith | 9dda8f5 | 2019-03-06 02:50:46 +0000 | [diff] [blame] | 22 | // CHECK: remark: building module 'A' |
| 23 | // CHECK: remark: building module 'B' |
| 24 | // CHECK: remark: building module 'C' |
| 25 | // CHECK: remark: finished building module 'C' |
Duncan P. N. Exon Smith | a75c4df | 2019-03-06 05:42:56 +0000 | [diff] [blame] | 26 | // CHECK: remark: importing module 'C' from '{{.*[/\\]}}C.pcm' |
Duncan P. N. Exon Smith | 9dda8f5 | 2019-03-06 02:50:46 +0000 | [diff] [blame] | 27 | // CHECK: remark: finished building module 'B' |
Duncan P. N. Exon Smith | a75c4df | 2019-03-06 05:42:56 +0000 | [diff] [blame] | 28 | // CHECK: remark: importing module 'B' from '{{.*[/\\]}}B.pcm' |
| 29 | // CHECK: remark: importing module 'C' into 'B' from '{{.*[/\\]}}C.pcm' |
Duncan P. N. Exon Smith | 9dda8f5 | 2019-03-06 02:50:46 +0000 | [diff] [blame] | 30 | // CHECK: remark: finished building module 'A' |
Duncan P. N. Exon Smith | a75c4df | 2019-03-06 05:42:56 +0000 | [diff] [blame] | 31 | // CHECK: remark: importing module 'A' from '{{.*[/\\]}}A.pcm' |
| 32 | // CHECK: remark: importing module 'B' into 'A' from '{{.*[/\\]}}B.pcm' |
| 33 | // CHECK: remark: importing module 'C' into 'B' from '{{.*[/\\]}}C.pcm' |
Duncan P. N. Exon Smith | 9dda8f5 | 2019-03-06 02:50:46 +0000 | [diff] [blame] | 34 | #include "B.h" // \ |
Duncan P. N. Exon Smith | a75c4df | 2019-03-06 05:42:56 +0000 | [diff] [blame] | 35 | expected-remark-re{{importing module 'B' from '{{.*[/\\]}}B.pcm'}} |
| 36 | // CHECK: remark: importing module 'B' from '{{.*[/\\]}}B.pcm' |
Duncan P. N. Exon Smith | 9dda8f5 | 2019-03-06 02:50:46 +0000 | [diff] [blame] | 37 | #include "C.h" // \ |
Duncan P. N. Exon Smith | a75c4df | 2019-03-06 05:42:56 +0000 | [diff] [blame] | 38 | expected-remark-re{{importing module 'C' from '{{.*[/\\]}}C.pcm'}} |
| 39 | // CHECK: remark: importing module 'C' from '{{.*[/\\]}}C.pcm' |
Duncan P. N. Exon Smith | 9dda8f5 | 2019-03-06 02:50:46 +0000 | [diff] [blame] | 40 | @import D; // \ |
Duncan P. N. Exon Smith | a75c4df | 2019-03-06 05:42:56 +0000 | [diff] [blame] | 41 | expected-remark-re{{building module 'D' as '{{.*[/\\]}}D.pcm'}} \ |
Duncan P. N. Exon Smith | 9dda8f5 | 2019-03-06 02:50:46 +0000 | [diff] [blame] | 42 | expected-remark{{finished building module 'D'}} \ |
Duncan P. N. Exon Smith | a75c4df | 2019-03-06 05:42:56 +0000 | [diff] [blame] | 43 | expected-remark-re{{importing module 'D' from '{{.*[/\\]}}D.pcm'}} |
Duncan P. N. Exon Smith | 9dda8f5 | 2019-03-06 02:50:46 +0000 | [diff] [blame] | 44 | // CHECK: remark: building module 'D' |
| 45 | // CHECK: remark: finished building module 'D' |
Duncan P. N. Exon Smith | a75c4df | 2019-03-06 05:42:56 +0000 | [diff] [blame] | 46 | // CHECK: remark: importing module 'D' from '{{.*[/\\]}}D.pcm' |