Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1 | // 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 | |
| 14 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %t %s -verify |
| 15 | // RUN: echo " " >> %t/D.h |
| 16 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %t %s -verify |
| 17 | // 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. |