Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1 | // RUN: rm -rf %t |
| 2 | // RUN: mkdir %t |
| 3 | // RUN: echo '// A' > %t/A.h |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 4 | // RUN: echo '#include "C.h"' > %t/B.h |
| 5 | // RUN: echo '// C' > %t/C.h |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 6 | // RUN: echo 'module A { header "A.h" }' > %t/module.modulemap |
| 7 | // RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 8 | // RUN: echo 'module C { header "C.h" }' >> %t/module.modulemap |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 9 | |
| 10 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -verify \ |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 11 | // RUN: -I %t -Rmodule-build |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 12 | |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 13 | @import A; // expected-remark{{building module 'A' as}} expected-remark {{finished building module 'A'}} |
| 14 | @import B; // expected-remark{{building module 'B' as}} expected-remark {{finished building module 'B'}} |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 15 | @import A; // no diagnostic |
| 16 | @import B; // no diagnostic |
| 17 | |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 18 | // RUN: echo ' ' >> %t/C.h |
| 19 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ |
| 20 | // RUN: -Rmodule-build 2>&1 | FileCheck %s |
| 21 | |
| 22 | // RUN: echo ' ' >> %t/C.h |
| 23 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ |
| 24 | // RUN: -Reverything 2>&1 | FileCheck %s |
| 25 | |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 26 | // RUN: echo ' ' >> %t/B.h |
| 27 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 28 | // RUN: 2>&1 | FileCheck -allow-empty -check-prefix=NO-REMARKS %s |
| 29 | |
| 30 | // RUN: echo ' ' >> %t/B.h |
| 31 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ |
| 32 | // RUN: -Rmodule-build -Rno-everything 2>&1 | \ |
| 33 | // RUN: FileCheck -allow-empty -check-prefix=NO-REMARKS %s |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 34 | |
| 35 | // CHECK-NOT: building module 'A' |
| 36 | // CHECK: building module 'B' |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 37 | // CHECK: building module 'C' |
| 38 | // CHECK: finished building module 'C' |
| 39 | // CHECK: finished building module 'B' |
| 40 | // NO-REMARKS-NOT: building module 'A' |
| 41 | // NO-REMARKS-NOT: building module 'B' |