mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ClangImporter: Use the new CacheGeneratedPCH in Clang
This flag causes the generated PCH to be written into the in-memory
module cache. Every CompilerInstance that tries to read the PCH will
use it rather than reading a potentially-since-overwritten version from
the filesystem.
rdar://problem/48740787
(cherry picked from commit 236fc19121)
This commit is contained in:
@@ -1440,6 +1440,7 @@ ClangImporter::emitBridgingPCH(StringRef headerPath,
|
||||
invocation->getFrontendOpts().ProgramAction = clang::frontend::GeneratePCH;
|
||||
invocation->getPreprocessorOpts().resetNonModularOptions();
|
||||
invocation->getLangOpts()->NeededByPCHOrCompilationUsesPCH = true;
|
||||
invocation->getLangOpts()->CacheGeneratedPCH = true;
|
||||
|
||||
clang::CompilerInstance emitInstance(
|
||||
Impl.Instance->getPCHContainerOperations(),
|
||||
|
||||
Reference in New Issue
Block a user