@@ -770,6 +770,7 @@ bool ClangImporter::canReadPCH(StringRef PCHFilename) {
770
770
*clangDiags,
771
771
CI.getLangOpts (),
772
772
clangSrcMgr,
773
+ CI.getPCMCache (),
773
774
headerSearchInfo,
774
775
(clang::ModuleLoader &)CI,
775
776
/* IILookup=*/ nullptr ,
@@ -782,7 +783,7 @@ bool ClangImporter::canReadPCH(StringRef PCHFilename) {
782
783
// Note: Reusing the PCHContainerReader or ModuleFileExtensions could be
783
784
// dangerous.
784
785
std::unique_ptr<clang::ASTReader> Reader (new clang::ASTReader (
785
- PP, CI. getModuleCache (), &ctx, CI.getPCHContainerReader (),
786
+ PP, &ctx, CI.getPCHContainerReader (),
786
787
CI.getFrontendOpts ().ModuleFileExtensions ,
787
788
CI.getHeaderSearchOpts ().Sysroot ,
788
789
/* DisableValidation*/ false ,
@@ -1394,8 +1395,7 @@ std::string ClangImporter::getBridgingHeaderContents(StringRef headerPath,
1394
1395
invocation->getPreprocessorOpts ().resetNonModularOptions ();
1395
1396
1396
1397
clang::CompilerInstance rewriteInstance (
1397
- Impl.Instance ->getPCHContainerOperations (),
1398
- &Impl.Instance ->getModuleCache ());
1398
+ Impl.Instance ->getPCHContainerOperations ());
1399
1399
rewriteInstance.setInvocation (invocation);
1400
1400
rewriteInstance.createDiagnostics (new clang::IgnoringDiagConsumer);
1401
1401
@@ -1451,11 +1451,9 @@ ClangImporter::emitBridgingPCH(StringRef headerPath,
1451
1451
invocation->getFrontendOpts ().ProgramAction = clang::frontend::GeneratePCH;
1452
1452
invocation->getPreprocessorOpts ().resetNonModularOptions ();
1453
1453
invocation->getLangOpts ()->NeededByPCHOrCompilationUsesPCH = true ;
1454
- invocation->getLangOpts ()->CacheGeneratedPCH = true ;
1455
1454
1456
1455
clang::CompilerInstance emitInstance (
1457
- Impl.Instance ->getPCHContainerOperations (),
1458
- &Impl.Instance ->getModuleCache ());
1456
+ Impl.Instance ->getPCHContainerOperations ());
1459
1457
emitInstance.setInvocation (std::move (invocation));
1460
1458
emitInstance.createDiagnostics (&Impl.Instance ->getDiagnosticClient (),
1461
1459
/* ShouldOwnClient=*/ false );
0 commit comments