blob: b8abc01c2c1a4620f239a43f0c0ff6106b085af0 [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 \
27// RUN: 2>&1 | count 0
28
29// RUN: echo ' ' >> %t/B.h
30// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
31// RUN: -Rmodule-build -Rno-everything 2>&1 | count 0
Ben Langmuir1ecf7502014-05-05 16:58:47 +000032
33// CHECK-NOT: building module 'A'
34// CHECK: building module 'B'