llvm-project/clang/test/PCH/modified-module-dependency.m
Michael Spencer a171d248ca
[clang][modules] Deprecate module.map in favor of module.modulemap (#75142)
This patch deprecates `module.map` in favor of `module.modulemap`, which
has been the preferred form since 2014. The eventual goal is to remove
support for `module.map` to reduce the number of stats Clang needs to do
while searching for module map files.

This patch touches a lot of files, but the majority of them are just
renaming tests or references to the file in comments or documentation.

The relevant files are:
* lib/Lex/HeaderSearch.cpp
* include/clang/Basic/DiagnosticGroups.td
* include/clang/Basic/DiagnosticLexKinds.td
2023-12-14 14:03:57 -08:00

21 lines
1.0 KiB
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.modulemap
// Precompile prefix.pch.
// 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
// Modify the dependency.
// RUN: echo ' ' >> %t-dir/test.h
// Run and check the diagnostics.
// 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
// RUN: FileCheck %s < %t-dir/log
// 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]]'