blob: 953c917cddcc0f8b8e1ea29c8c69f43d344b4d76 [file] [log] [blame]
Douglas Gregor7cdd2812012-11-07 17:46:15 +00001// 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 Gregor677e15f2013-03-19 00:28:20 +00009// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify
Douglas Gregor299c22f2012-12-11 22:25:26 +000010// RUN: echo '' >> %t/include/B.h
Douglas Gregor677e15f2013-03-19 00:28:20 +000011// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify
Douglas Gregor7cdd2812012-11-07 17:46:15 +000012// RUN: echo 'int getA(); int getA2();' > %t/include/A.h
Douglas Gregor677e15f2013-03-19 00:28:20 +000013// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify
Douglas Gregorcdf28082013-03-21 01:08:50 +000014// RUN: rm %t/cache/ModA.pcm
Douglas Gregor677e15f2013-03-19 00:28:20 +000015// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify
Douglas Gregorcdf28082013-03-21 01:08:50 +000016// RUN: touch %t/cache/ModA.pcm
Douglas Gregor677e15f2013-03-19 00:28:20 +000017// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify
18
19// expected-no-diagnostics
Douglas Gregor7cdd2812012-11-07 17:46:15 +000020
NAKAMURA Takumi0faaa162012-12-12 00:51:38 +000021// FIXME: It is intended to suppress this on win32.
22// REQUIRES: ansi-escape-sequences
23
Douglas Gregorcdf28082013-03-21 01:08:50 +000024@import ModB;
Douglas Gregor7cdd2812012-11-07 17:46:15 +000025
26int getValue() { return getA() + getB(); }
27
28
29
30
31