1*67e74705SXin Li// RUN: rm -rf %t 2*67e74705SXin Li// RUN: mkdir -p %t 3*67e74705SXin Li 4*67e74705SXin Li// RUN: echo '@import B;' > %t/A.h 5*67e74705SXin Li// RUN: echo '@import C;' > %t/B.h 6*67e74705SXin Li// RUN: echo '@import D;' >> %t/B.h 7*67e74705SXin Li// RUN: echo '// C.h' > %t/C.h 8*67e74705SXin Li// RUN: echo '// D.h' > %t/D.h 9*67e74705SXin Li// RUN: echo 'module A { header "A.h" }' > %t/module.modulemap 10*67e74705SXin Li// RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap 11*67e74705SXin Li// RUN: echo 'module C { header "C.h" }' >> %t/module.modulemap 12*67e74705SXin Li// RUN: echo 'module D { header "D.h" }' >> %t/module.modulemap 13*67e74705SXin Li 14*67e74705SXin Li// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %t %s -verify 15*67e74705SXin Li// RUN: echo " " >> %t/D.h 16*67e74705SXin Li// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %t %s -verify 17*67e74705SXin Li// expected-no-diagnostics 18*67e74705SXin Li 19*67e74705SXin Li 20*67e74705SXin Li@import C; 21*67e74705SXin Li@import A; 22*67e74705SXin Li@import C; 23*67e74705SXin Li// When compiling A, C will be be loaded then removed when D fails. Ensure 24*67e74705SXin Li// this does not cause problems importing C again later. 25