mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 11:06:06 +00:00

Show the top-level pch file as the culprit, rather than the immediate dependency when a pch file imports a pcm from a module. To clarify the relationship, the pch import stack is printed as notes. The old behaviour was misleading when a pch imported a pcm (from a module), since removing the pcm would not fix the problem, whereas rebuilding the pch would. llvm-svn: 199446
21 lines
934 B
Matlab
21 lines
934 B
Matlab
// 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.
|
|
// 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
|
|
|
|
// Modify the dependency.
|
|
// RUN: echo ' ' >> %t-dir/test.h
|
|
|
|
// Run and check the diagnostics.
|
|
// 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
|
|
// RUN: FileCheck %s < %t-dir/log
|
|
|
|
// CHECK: file '{{.*}}/test.h' has been modified since the precompiled header '{{.*}}prefix.pch' was built
|
|
// CHECK: '{{.*}}/test.h' required by '{{.*}}/test.pcm'
|
|
// CHECK: '{{.*}}/test.pcm' required by '{{.*}}/prefix.pch'
|
|
// CHECK: please rebuild precompiled header '{{.*}}/prefix.pch'
|