blob: e8f293535178f818de72cfbf48b72d0006b15d67 [file] [log] [blame]
Stephen Hines6bcf27b2014-05-29 04:14:42 -07001// RUN: rm -rf %t
2// RUN: mkdir %t
3// RUN: echo '// A' > %t/A.h
Stephen Hines176edba2014-12-01 14:53:08 -08004// RUN: echo '#include "C.h"' > %t/B.h
5// RUN: echo '// C' > %t/C.h
Stephen Hines6bcf27b2014-05-29 04:14:42 -07006// RUN: echo 'module A { header "A.h" }' > %t/module.modulemap
7// RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap
Stephen Hines176edba2014-12-01 14:53:08 -08008// RUN: echo 'module C { header "C.h" }' >> %t/module.modulemap
Stephen Hines6bcf27b2014-05-29 04:14:42 -07009
10// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -verify \
Stephen Hines176edba2014-12-01 14:53:08 -080011// RUN: -I %t -Rmodule-build
Stephen Hines6bcf27b2014-05-29 04:14:42 -070012
Stephen Hines176edba2014-12-01 14:53:08 -080013@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 Hines6bcf27b2014-05-29 04:14:42 -070015@import A; // no diagnostic
16@import B; // no diagnostic
17
Stephen Hines176edba2014-12-01 14:53:08 -080018// 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 Hines6bcf27b2014-05-29 04:14:42 -070026// RUN: echo ' ' >> %t/B.h
27// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
Stephen Hines176edba2014-12-01 14:53:08 -080028// 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 Hines6bcf27b2014-05-29 04:14:42 -070034
35// CHECK-NOT: building module 'A'
36// CHECK: building module 'B'
Stephen Hines176edba2014-12-01 14:53:08 -080037// 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'