| 1 |
// RUN: rm -rf %t |
| 2 |
// RUN: mkdir %t |
| 3 |
// RUN: echo '// A' > %t/A.h |
| 4 |
// RUN: echo '#include "C.h"' > %t/B.h |
| 5 |
// RUN: echo '// C' > %t/C.h |
| 6 |
// RUN: echo 'module A { header "A.h" }' > %t/module.modulemap |
| 7 |
// RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap |
| 8 |
// RUN: echo 'module C { header "C.h" }' >> %t/module.modulemap |
| 9 |
|
| 10 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -verify \ |
| 11 |
// RUN: -I %t -Rmodule-build |
| 12 |
|
| 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'}} |
| 15 |
@import A; // no diagnostic |
| 16 |
@import B; // no diagnostic |
| 17 |
|
| 18 |
// RUN: echo ' ' >> %t/C.h |
| 19 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \ |
| 20 |
// RUN: -Rmodule-build 2>&1 | FileCheck %s |
| 21 |
|
| 22 |
// RUN: echo ' ' >> %t/B.h |
| 23 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \ |
| 24 |
// RUN: 2>&1 | FileCheck -allow-empty -check-prefix=NO-REMARKS %s |
| 25 |
|
| 26 |
// RUN: echo ' ' >> %t/B.h |
| 27 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \ |
| 28 |
// RUN: -Rmodule-build -Rno-everything 2>&1 | \ |
| 29 |
// RUN: FileCheck -allow-empty -check-prefix=NO-REMARKS %s |
| 30 |
|
| 31 |
// CHECK-NOT: building module 'A' |
| 32 |
// CHECK: building module 'B' |
| 33 |
// CHECK: building module 'C' |
| 34 |
// CHECK: finished building module 'C' |
| 35 |
// CHECK: finished building module 'B' |
| 36 |
// NO-REMARKS-NOT: building module 'A' |
| 37 |
// NO-REMARKS-NOT: building module 'B' |