blob: ecd96cf6475102b7dbca11bc99eb132ce48048ef [file] [log] [blame]
Ben Langmuir1ecf7502014-05-05 16:58:47 +00001// REQUIRES: shell
2// RUN: rm -rf %t
3// RUN: mkdir %t
4// RUN: echo '// A' > %t/A.h
Richard Smith99891da2014-10-14 02:08:30 +00005// RUN: echo '#include "C.h"' > %t/B.h
6// RUN: echo '// C' > %t/C.h
Ben Langmuir1ecf7502014-05-05 16:58:47 +00007// RUN: echo 'module A { header "A.h" }' > %t/module.modulemap
8// RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap
Richard Smith99891da2014-10-14 02:08:30 +00009// RUN: echo 'module C { header "C.h" }' >> %t/module.modulemap
Ben Langmuir1ecf7502014-05-05 16:58:47 +000010
11// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -verify \
Richard Smith3be1cb22014-08-07 00:24:21 +000012// RUN: -I %t -Rmodule-build
Ben Langmuir1ecf7502014-05-05 16:58:47 +000013
Richard Smith99891da2014-10-14 02:08:30 +000014@import A; // expected-remark{{building module 'A' as}} expected-remark {{finished building module 'A'}}
15@import B; // expected-remark{{building module 'B' as}} expected-remark {{finished building module 'B'}}
Ben Langmuir1ecf7502014-05-05 16:58:47 +000016@import A; // no diagnostic
17@import B; // no diagnostic
18
Richard Smith99891da2014-10-14 02:08:30 +000019// RUN: echo ' ' >> %t/C.h
Ben Langmuir1ecf7502014-05-05 16:58:47 +000020// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
Richard Smith3be1cb22014-08-07 00:24:21 +000021// RUN: -Rmodule-build 2>&1 | FileCheck %s
22
Richard Smith99891da2014-10-14 02:08:30 +000023// RUN: echo ' ' >> %t/C.h
Richard Smith3be1cb22014-08-07 00:24:21 +000024// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
25// RUN: -Reverything 2>&1 | FileCheck %s
26
27// RUN: echo ' ' >> %t/B.h
28// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
Justin Bogner69ba3302014-08-07 18:45:21 +000029// RUN: 2>&1 | FileCheck -allow-empty -check-prefix=NO-REMARKS %s
Richard Smith3be1cb22014-08-07 00:24:21 +000030
31// RUN: echo ' ' >> %t/B.h
32// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
Justin Bogner69ba3302014-08-07 18:45:21 +000033// RUN: -Rmodule-build -Rno-everything 2>&1 | \
34// RUN: FileCheck -allow-empty -check-prefix=NO-REMARKS %s
Ben Langmuir1ecf7502014-05-05 16:58:47 +000035
36// CHECK-NOT: building module 'A'
37// CHECK: building module 'B'
Richard Smith99891da2014-10-14 02:08:30 +000038// CHECK: building module 'C'
39// CHECK: finished building module 'C'
40// CHECK: finished building module 'B'
Justin Bogner69ba3302014-08-07 18:45:21 +000041// NO-REMARKS-NOT: building module 'A'
42// NO-REMARKS-NOT: building module 'B'