Douglas Gregor | 7cdd281 | 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 |
| 6 | // RUN: cp %S/Inputs/Modified/A.h %t/include |
| 7 | // RUN: cp %S/Inputs/Modified/B.h %t/include |
| 8 | // RUN: cp %S/Inputs/Modified/module.map %t/include |
Douglas Gregor | 953a61f | 2013-02-07 19:01:24 +0000 | [diff] [blame] | 9 | // RUN: %clang_cc1 -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify |
Douglas Gregor | 7cdd281 | 2012-11-07 17:46:15 +0000 | [diff] [blame] | 10 | // expected-no-diagnostics |
Douglas Gregor | 299c22f | 2012-12-11 22:25:26 +0000 | [diff] [blame] | 11 | // RUN: echo '' >> %t/include/B.h |
Douglas Gregor | 953a61f | 2013-02-07 19:01:24 +0000 | [diff] [blame] | 12 | // RUN: %clang_cc1 -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify |
Douglas Gregor | 7cdd281 | 2012-11-07 17:46:15 +0000 | [diff] [blame] | 13 | // RUN: echo 'int getA(); int getA2();' > %t/include/A.h |
Douglas Gregor | 953a61f | 2013-02-07 19:01:24 +0000 | [diff] [blame] | 14 | // RUN: %clang_cc1 -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify |
Douglas Gregor | 7cdd281 | 2012-11-07 17:46:15 +0000 | [diff] [blame] | 15 | |
NAKAMURA Takumi | 0faaa16 | 2012-12-12 00:51:38 +0000 | [diff] [blame] | 16 | // FIXME: It is intended to suppress this on win32. |
| 17 | // REQUIRES: ansi-escape-sequences |
| 18 | |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 19 | @import B; |
Douglas Gregor | 7cdd281 | 2012-11-07 17:46:15 +0000 | [diff] [blame] | 20 | |
| 21 | int getValue() { return getA() + getB(); } |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |