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