Douglas Gregor | 188dbef | 2012-11-07 17:46:15 +0000 | [diff] [blame] | 1 | // Test that if we modify one of the input files used to form a |
| 2 | // header, that module and dependent modules get rebuilt. |
| 3 | |
| 4 | // RUN: rm -rf %t |
| 5 | // RUN: mkdir -p %t/include |
Sam McCall | 94af521 | 2018-01-09 09:32:53 +0000 | [diff] [blame] | 6 | // RUN: cat %S/Inputs/Modified/A.h > %t/include/A.h |
| 7 | // RUN: cat %S/Inputs/Modified/B.h > %t/include/B.h |
| 8 | // RUN: cat %S/Inputs/Modified/module.map > %t/include/module.map |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 9 | // RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify |
Douglas Gregor | 822627f | 2012-12-11 22:25:26 +0000 | [diff] [blame] | 10 | // RUN: echo '' >> %t/include/B.h |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 11 | // RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify |
Douglas Gregor | 188dbef | 2012-11-07 17:46:15 +0000 | [diff] [blame] | 12 | // RUN: echo 'int getA(); int getA2();' > %t/include/A.h |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 13 | // RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify |
Douglas Gregor | 0339a64 | 2013-03-21 01:08:50 +0000 | [diff] [blame] | 14 | // RUN: rm %t/cache/ModA.pcm |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 15 | // RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify |
Douglas Gregor | 0339a64 | 2013-03-21 01:08:50 +0000 | [diff] [blame] | 16 | // RUN: touch %t/cache/ModA.pcm |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 17 | // RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify |
Douglas Gregor | 7029ce1 | 2013-03-19 00:28:20 +0000 | [diff] [blame] | 18 | |
| 19 | // expected-no-diagnostics |
Douglas Gregor | 188dbef | 2012-11-07 17:46:15 +0000 | [diff] [blame] | 20 | |
NAKAMURA Takumi | e981508 | 2012-12-12 00:51:38 +0000 | [diff] [blame] | 21 | // FIXME: It is intended to suppress this on win32. |
| 22 | // REQUIRES: ansi-escape-sequences |
| 23 | |
Douglas Gregor | 0339a64 | 2013-03-21 01:08:50 +0000 | [diff] [blame] | 24 | @import ModB; |
Douglas Gregor | 188dbef | 2012-11-07 17:46:15 +0000 | [diff] [blame] | 25 | |
| 26 | int getValue() { return getA() + getB(); } |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |