[all-commits] [llvm/llvm-project] 78668c: [clang][modules][pch] Allow loading PCH with diffe...
Jan Svoboda via All-commits
all-commits at lists.llvm.org
Mon Jun 14 02:05:19 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 78668c822af9504f77a554f5924e1097365d9c33
https://github.com/llvm/llvm-project/commit/78668c822af9504f77a554f5924e1097365d9c33
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2021-06-14 (Mon, 14 Jun 2021)
Changed paths:
M clang/include/clang/Driver/Options.td
M clang/include/clang/Lex/PreprocessorOptions.h
M clang/lib/Serialization/ASTReader.cpp
A clang/test/Modules/Inputs/pch-typedef.h
A clang/test/Modules/module-pch-different-cache-path.c
Log Message:
-----------
[clang][modules][pch] Allow loading PCH with different modules cache path
It's useful to be able to load explicitly-built PCH files into an implicit build (e.g. during dependency scanning). That's currently impossible, since the explicitly-built PCH has an empty modules cache path, while the current compilation has (and needs to have) a valid path, triggering an error in the `PCHValidator`.
This patch adds a preprocessor option and command-line flag that can be used to omit this check.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D103802
More information about the All-commits
mailing list