blob: 656fa345655bb17c3f137e2d440d5f0076d2f4a8 [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.
8// RUN: %clang_cc1 -x objective-c -I %t-dir -fmodules -fmodules-cache-path=%t-dir/cache -emit-pch %t-dir/prefix.h -o %t-dir/prefix.pch
9
10// Modify the dependency.
11// RUN: echo ' ' >> %t-dir/test.h
12
13// Run and check the diagnostics.
14// RUN: not %clang_cc1 -x objective-c -include-pch %t-dir/prefix.pch -fmodules -fmodules-cache-path=%t-dir/cache -fsyntax-only %s 2> %t-dir/log
15// RUN: FileCheck %s < %t-dir/log
16
17// CHECK: file '{{.*}}/test.h' has been modified since the precompiled header '{{.*}}prefix.pch' was built
18// CHECK: '{{.*}}/test.h' required by '{{.*}}/test.pcm'
19// CHECK: '{{.*}}/test.pcm' required by '{{.*}}/prefix.pch'
20// CHECK: please rebuild precompiled header '{{.*}}/prefix.pch'