Ben Langmuir | 1ecf750 | 2014-05-05 16:58:47 +0000 | [diff] [blame] | 1 | // 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 Smith | 3be1cb2 | 2014-08-07 00:24:21 +0000 | [diff] [blame^] | 10 | // RUN: -I %t -Rmodule-build |
Ben Langmuir | 1ecf750 | 2014-05-05 16:58:47 +0000 | [diff] [blame] | 11 | |
Ben Langmuir | c95e564 | 2014-05-08 22:36:02 +0000 | [diff] [blame] | 12 | @import A; // expected-remark{{building module 'A' as}} |
| 13 | @import B; // expected-remark{{building module 'B' as}} |
Ben Langmuir | 1ecf750 | 2014-05-05 16:58:47 +0000 | [diff] [blame] | 14 | @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 Smith | 3be1cb2 | 2014-08-07 00:24:21 +0000 | [diff] [blame^] | 19 | // 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 Langmuir | 1ecf750 | 2014-05-05 16:58:47 +0000 | [diff] [blame] | 32 | |
| 33 | // CHECK-NOT: building module 'A' |
| 34 | // CHECK: building module 'B' |