2014-01-17 08:19:09 +08:00
|
|
|
// RUN: rm -rf %t-dir
|
|
|
|
// RUN: mkdir -p %t-dir
|
|
|
|
// RUN: echo '@import test;' > %t-dir/prefix.h
|
|
|
|
// RUN: echo 'void foo(void);' > %t-dir/test.h
|
|
|
|
// RUN: cp %S/modified-module-dependency.module.map %t-dir/module.map
|
|
|
|
|
|
|
|
// Precompile prefix.pch.
|
2014-04-15 02:00:01 +08:00
|
|
|
// 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
|
2014-01-17 08:19:09 +08:00
|
|
|
|
|
|
|
// Modify the dependency.
|
|
|
|
// RUN: echo ' ' >> %t-dir/test.h
|
|
|
|
|
|
|
|
// Run and check the diagnostics.
|
2014-04-15 02:00:01 +08:00
|
|
|
// 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
|
2014-01-17 08:19:09 +08:00
|
|
|
// RUN: FileCheck %s < %t-dir/log
|
|
|
|
|
2014-01-17 15:04:17 +08:00
|
|
|
// CHECK: file '[[TEST_H:.*[/\\]test\.h]]' has been modified since the precompiled header '[[PREFIX_PCH:.*/prefix\.pch]]' was built
|
|
|
|
// CHECK: '[[TEST_H]]' required by '[[TEST_PCM:.*[/\\]test\.pcm]]'
|
|
|
|
// CHECK: '[[TEST_PCM]]' required by '[[PREFIX_PCH]]'
|
|
|
|
// CHECK: please rebuild precompiled header '[[PREFIX_PCH]]'
|