blob: 73ed0e79708b98679914102cbeb3e6f7fb025f69 [file] [log] [blame]
Ben Langmuirca392142014-05-19 16:13:45 +00001// RUN: rm -rf %t
2// RUN: mkdir -p %t
3
4// RUN: echo '@import B;' > %t/A.h
5// RUN: echo '@import C;' > %t/B.h
6// RUN: echo '@import D;' >> %t/B.h
7// RUN: echo '// C.h' > %t/C.h
8// RUN: echo '// D.h' > %t/D.h
9// RUN: echo 'module A { header "A.h" }' > %t/module.modulemap
10// RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap
11// RUN: echo 'module C { header "C.h" }' >> %t/module.modulemap
12// RUN: echo 'module D { header "D.h" }' >> %t/module.modulemap
13
Richard Smith47972af2015-06-16 00:08:24 +000014// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %t %s -verify
Ben Langmuirca392142014-05-19 16:13:45 +000015// RUN: echo " " >> %t/D.h
Richard Smith47972af2015-06-16 00:08:24 +000016// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %t %s -verify
Ben Langmuirca392142014-05-19 16:13:45 +000017// expected-no-diagnostics
18
19
20@import C;
21@import A;
22@import C;
23// When compiling A, C will be be loaded then removed when D fails. Ensure
24// this does not cause problems importing C again later.