blob: d59a4799104ff1ae7e557a678e5ef7c266f9da79 [file] [log] [blame]
Douglas Gregor188dbef2012-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
Sam McCall94af5212018-01-09 09:32:53 +00006// 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 Smith47972af2015-06-16 00:08:24 +00009// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify
Douglas Gregor822627f2012-12-11 22:25:26 +000010// RUN: echo '' >> %t/include/B.h
Richard Smith47972af2015-06-16 00:08:24 +000011// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify
Douglas Gregor188dbef2012-11-07 17:46:15 +000012// RUN: echo 'int getA(); int getA2();' > %t/include/A.h
Richard Smith47972af2015-06-16 00:08:24 +000013// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify
Douglas Gregor0339a642013-03-21 01:08:50 +000014// RUN: rm %t/cache/ModA.pcm
Richard Smith47972af2015-06-16 00:08:24 +000015// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify
Douglas Gregor0339a642013-03-21 01:08:50 +000016// RUN: touch %t/cache/ModA.pcm
Richard Smith47972af2015-06-16 00:08:24 +000017// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify
Douglas Gregor7029ce12013-03-19 00:28:20 +000018
19// expected-no-diagnostics
Douglas Gregor188dbef2012-11-07 17:46:15 +000020
NAKAMURA Takumie9815082012-12-12 00:51:38 +000021// FIXME: It is intended to suppress this on win32.
22// REQUIRES: ansi-escape-sequences
23
Douglas Gregor0339a642013-03-21 01:08:50 +000024@import ModB;
Douglas Gregor188dbef2012-11-07 17:46:15 +000025
26int getValue() { return getA() + getB(); }
27
28
29
30
31