blob: 11a1615007111bf0346de5bc10f9908755dbe575 [file] [log] [blame]
Duncan P. N. Exon Smith9dda8f52019-03-06 02:50:46 +00001// 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 Smitha75c4df2019-03-06 05:42:56 +000017 expected-remark-re{{building module 'A' as '{{.*[/\\]}}A.pcm'}} \
Duncan P. N. Exon Smith9dda8f52019-03-06 02:50:46 +000018 expected-remark{{finished building module 'A'}} \
Duncan P. N. Exon Smitha75c4df2019-03-06 05:42:56 +000019 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 Smith9dda8f52019-03-06 02:50:46 +000022// 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 Smitha75c4df2019-03-06 05:42:56 +000026// CHECK: remark: importing module 'C' from '{{.*[/\\]}}C.pcm'
Duncan P. N. Exon Smith9dda8f52019-03-06 02:50:46 +000027// CHECK: remark: finished building module 'B'
Duncan P. N. Exon Smitha75c4df2019-03-06 05:42:56 +000028// CHECK: remark: importing module 'B' from '{{.*[/\\]}}B.pcm'
29// CHECK: remark: importing module 'C' into 'B' from '{{.*[/\\]}}C.pcm'
Duncan P. N. Exon Smith9dda8f52019-03-06 02:50:46 +000030// CHECK: remark: finished building module 'A'
Duncan P. N. Exon Smitha75c4df2019-03-06 05:42:56 +000031// 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 Smith9dda8f52019-03-06 02:50:46 +000034#include "B.h" // \
Duncan P. N. Exon Smitha75c4df2019-03-06 05:42:56 +000035 expected-remark-re{{importing module 'B' from '{{.*[/\\]}}B.pcm'}}
36// CHECK: remark: importing module 'B' from '{{.*[/\\]}}B.pcm'
Duncan P. N. Exon Smith9dda8f52019-03-06 02:50:46 +000037#include "C.h" // \
Duncan P. N. Exon Smitha75c4df2019-03-06 05:42:56 +000038 expected-remark-re{{importing module 'C' from '{{.*[/\\]}}C.pcm'}}
39// CHECK: remark: importing module 'C' from '{{.*[/\\]}}C.pcm'
Duncan P. N. Exon Smith9dda8f52019-03-06 02:50:46 +000040@import D; // \
Duncan P. N. Exon Smitha75c4df2019-03-06 05:42:56 +000041 expected-remark-re{{building module 'D' as '{{.*[/\\]}}D.pcm'}} \
Duncan P. N. Exon Smith9dda8f52019-03-06 02:50:46 +000042 expected-remark{{finished building module 'D'}} \
Duncan P. N. Exon Smitha75c4df2019-03-06 05:42:56 +000043 expected-remark-re{{importing module 'D' from '{{.*[/\\]}}D.pcm'}}
Duncan P. N. Exon Smith9dda8f52019-03-06 02:50:46 +000044// CHECK: remark: building module 'D'
45// CHECK: remark: finished building module 'D'
Duncan P. N. Exon Smitha75c4df2019-03-06 05:42:56 +000046// CHECK: remark: importing module 'D' from '{{.*[/\\]}}D.pcm'