blob: 3aba1857bcffcdb4ef4c8a2b6cfc5293c391ccfd [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
5// RUN: echo '// B' > %t/B.h
6// RUN: echo 'module A { header "A.h" }' > %t/module.modulemap
7// RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap
8
9// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -verify \
Richard Smith3be1cb22014-08-07 00:24:21 +000010// RUN: -I %t -Rmodule-build
Ben Langmuir1ecf7502014-05-05 16:58:47 +000011
Ben Langmuirc95e5642014-05-08 22:36:02 +000012@import A; // expected-remark{{building module 'A' as}}
13@import B; // expected-remark{{building module 'B' as}}
Ben Langmuir1ecf7502014-05-05 16:58:47 +000014@import A; // no diagnostic
15@import B; // no diagnostic
16
17// RUN: echo ' ' >> %t/B.h
18// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
Richard Smith3be1cb22014-08-07 00:24:21 +000019// RUN: -Rmodule-build 2>&1 | FileCheck %s
20
21// RUN: echo ' ' >> %t/B.h
22// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
23// RUN: -Reverything 2>&1 | FileCheck %s
24
25// RUN: echo ' ' >> %t/B.h
26// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
Justin Bogner69ba3302014-08-07 18:45:21 +000027// RUN: 2>&1 | FileCheck -allow-empty -check-prefix=NO-REMARKS %s
Richard Smith3be1cb22014-08-07 00:24:21 +000028
29// RUN: echo ' ' >> %t/B.h
30// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
Justin Bogner69ba3302014-08-07 18:45:21 +000031// RUN: -Rmodule-build -Rno-everything 2>&1 | \
32// RUN: FileCheck -allow-empty -check-prefix=NO-REMARKS %s
Ben Langmuir1ecf7502014-05-05 16:58:47 +000033
34// CHECK-NOT: building module 'A'
35// CHECK: building module 'B'
Justin Bogner69ba3302014-08-07 18:45:21 +000036// NO-REMARKS-NOT: building module 'A'
37// NO-REMARKS-NOT: building module 'B'