1*67e74705SXin Li// RUN: rm -rf %t-dir 2*67e74705SXin Li// RUN: mkdir -p %t-dir 3*67e74705SXin Li// RUN: echo '@import test;' > %t-dir/prefix.h 4*67e74705SXin Li// RUN: echo 'void foo(void);' > %t-dir/test.h 5*67e74705SXin Li// RUN: cp %S/modified-module-dependency.module.map %t-dir/module.map 6*67e74705SXin Li 7*67e74705SXin Li// Precompile prefix.pch. 8*67e74705SXin Li// RUN: %clang_cc1 -x objective-c -I %t-dir -fmodules -fimplicit-module-maps -fmodules-cache-path=%t-dir/cache -fdisable-module-hash -emit-pch %t-dir/prefix.h -o %t-dir/prefix.pch 9*67e74705SXin Li 10*67e74705SXin Li// Modify the dependency. 11*67e74705SXin Li// RUN: echo ' ' >> %t-dir/test.h 12*67e74705SXin Li 13*67e74705SXin Li// Run and check the diagnostics. 14*67e74705SXin Li// RUN: not %clang_cc1 -x objective-c -I %t-dir -include-pch %t-dir/prefix.pch -fmodules -fimplicit-module-maps -fmodules-cache-path=%t-dir/cache -fdisable-module-hash -fsyntax-only %s 2> %t-dir/log 15*67e74705SXin Li// RUN: FileCheck %s < %t-dir/log 16*67e74705SXin Li 17*67e74705SXin Li// CHECK: file '[[TEST_H:.*[/\\]test\.h]]' has been modified since the precompiled header '[[PREFIX_PCH:.*/prefix\.pch]]' was built 18*67e74705SXin Li// CHECK: '[[TEST_H]]' required by '[[TEST_PCM:.*[/\\]test\.pcm]]' 19*67e74705SXin Li// CHECK: '[[TEST_PCM]]' required by '[[PREFIX_PCH]]' 20*67e74705SXin Li// CHECK: please rebuild precompiled header '[[PREFIX_PCH]]' 21