Ben Langmuir | ca39214 | 2014-05-19 16:13:45 +0000 | [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 | |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 14 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %t %s -verify |
Ben Langmuir | ca39214 | 2014-05-19 16:13:45 +0000 | [diff] [blame] | 15 | // RUN: echo " " >> %t/D.h |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 16 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %t %s -verify |
Ben Langmuir | ca39214 | 2014-05-19 16:13:45 +0000 | [diff] [blame] | 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. |