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