blob: 5c27ec6dfd97e2a3e3f845566c4ad29b2547ab2b [file] [log] [blame]
Ben Langmuir1ecf7502014-05-05 16:58:47 +00001// RUN: rm -rf %t
2// RUN: mkdir %t
3// RUN: echo '// A' > %t/A.h
Richard Smith99891da2014-10-14 02:08:30 +00004// RUN: echo '#include "C.h"' > %t/B.h
5// RUN: echo '// C' > %t/C.h
Ben Langmuir1ecf7502014-05-05 16:58:47 +00006// RUN: echo 'module A { header "A.h" }' > %t/module.modulemap
7// RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap
Richard Smith99891da2014-10-14 02:08:30 +00008// RUN: echo 'module C { header "C.h" }' >> %t/module.modulemap
Ben Langmuir1ecf7502014-05-05 16:58:47 +00009
Richard Smith47972af2015-06-16 00:08:24 +000010// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -verify \
Richard Smith3be1cb22014-08-07 00:24:21 +000011// RUN: -I %t -Rmodule-build
Ben Langmuir1ecf7502014-05-05 16:58:47 +000012
Richard Smith99891da2014-10-14 02:08:30 +000013@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'}}
Ben Langmuir1ecf7502014-05-05 16:58:47 +000015@import A; // no diagnostic
16@import B; // no diagnostic
17
Richard Smith99891da2014-10-14 02:08:30 +000018// RUN: echo ' ' >> %t/C.h
Richard Smith47972af2015-06-16 00:08:24 +000019// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \
Richard Smith3be1cb22014-08-07 00:24:21 +000020// RUN: -Rmodule-build 2>&1 | FileCheck %s
21
Richard Smith99891da2014-10-14 02:08:30 +000022// RUN: echo ' ' >> %t/C.h
Richard Smith47972af2015-06-16 00:08:24 +000023// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \
Richard Smith3be1cb22014-08-07 00:24:21 +000024// RUN: -Reverything 2>&1 | FileCheck %s
25
26// RUN: echo ' ' >> %t/B.h
Richard Smith47972af2015-06-16 00:08:24 +000027// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \
Justin Bogner69ba3302014-08-07 18:45:21 +000028// RUN: 2>&1 | FileCheck -allow-empty -check-prefix=NO-REMARKS %s
Richard Smith3be1cb22014-08-07 00:24:21 +000029
30// RUN: echo ' ' >> %t/B.h
Richard Smith47972af2015-06-16 00:08:24 +000031// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \
Justin Bogner69ba3302014-08-07 18:45:21 +000032// RUN: -Rmodule-build -Rno-everything 2>&1 | \
33// RUN: FileCheck -allow-empty -check-prefix=NO-REMARKS %s
Ben Langmuir1ecf7502014-05-05 16:58:47 +000034
35// CHECK-NOT: building module 'A'
36// CHECK: building module 'B'
Richard Smith99891da2014-10-14 02:08:30 +000037// CHECK: building module 'C'
38// CHECK: finished building module 'C'
39// CHECK: finished building module 'B'
Justin Bogner69ba3302014-08-07 18:45:21 +000040// NO-REMARKS-NOT: building module 'A'
41// NO-REMARKS-NOT: building module 'B'