blob: 39fddb039bad621d844de4ed907dc93b8c5f884c [file] [log] [blame]
Ben Langmuire82630d2014-01-17 00:19:09 +00001// RUN: rm -rf %t-dir
2// RUN: mkdir -p %t-dir
3// RUN: echo '@import test;' > %t-dir/prefix.h
4// RUN: echo 'void foo(void);' > %t-dir/test.h
5// RUN: cp %S/modified-module-dependency.module.map %t-dir/module.map
6
7// Precompile prefix.pch.
Richard Smith3d8fcea2015-06-16 00:19:29 +00008// 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
Ben Langmuire82630d2014-01-17 00:19:09 +00009
10// Modify the dependency.
11// RUN: echo ' ' >> %t-dir/test.h
12
13// Run and check the diagnostics.
Richard Smith3d8fcea2015-06-16 00:19:29 +000014// 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
Ben Langmuire82630d2014-01-17 00:19:09 +000015// RUN: FileCheck %s < %t-dir/log
16
NAKAMURA Takumi4ec59172014-01-17 07:04:17 +000017// CHECK: file '[[TEST_H:.*[/\\]test\.h]]' has been modified since the precompiled header '[[PREFIX_PCH:.*/prefix\.pch]]' was built
18// CHECK: '[[TEST_H]]' required by '[[TEST_PCM:.*[/\\]test\.pcm]]'
19// CHECK: '[[TEST_PCM]]' required by '[[PREFIX_PCH]]'
20// CHECK: please rebuild precompiled header '[[PREFIX_PCH]]'