@@ -770,6 +770,7 @@ bool ClangImporter::canReadPCH(StringRef PCHFilename) {
770770 *clangDiags,
771771 CI.getLangOpts (),
772772 clangSrcMgr,
773+ CI.getPCMCache (),
773774 headerSearchInfo,
774775 (clang::ModuleLoader &)CI,
775776 /* IILookup=*/ nullptr ,
@@ -782,7 +783,7 @@ bool ClangImporter::canReadPCH(StringRef PCHFilename) {
782783 // Note: Reusing the PCHContainerReader or ModuleFileExtensions could be
783784 // dangerous.
784785 std::unique_ptr<clang::ASTReader> Reader (new clang::ASTReader (
785- PP, CI. getModuleCache (), &ctx, CI.getPCHContainerReader (),
786+ PP, &ctx, CI.getPCHContainerReader (),
786787 CI.getFrontendOpts ().ModuleFileExtensions ,
787788 CI.getHeaderSearchOpts ().Sysroot ,
788789 /* DisableValidation*/ false ,
@@ -1394,8 +1395,7 @@ std::string ClangImporter::getBridgingHeaderContents(StringRef headerPath,
13941395 invocation->getPreprocessorOpts ().resetNonModularOptions ();
13951396
13961397 clang::CompilerInstance rewriteInstance (
1397- Impl.Instance ->getPCHContainerOperations (),
1398- &Impl.Instance ->getModuleCache ());
1398+ Impl.Instance ->getPCHContainerOperations ());
13991399 rewriteInstance.setInvocation (invocation);
14001400 rewriteInstance.createDiagnostics (new clang::IgnoringDiagConsumer);
14011401
@@ -1451,11 +1451,9 @@ ClangImporter::emitBridgingPCH(StringRef headerPath,
14511451 invocation->getFrontendOpts ().ProgramAction = clang::frontend::GeneratePCH;
14521452 invocation->getPreprocessorOpts ().resetNonModularOptions ();
14531453 invocation->getLangOpts ()->NeededByPCHOrCompilationUsesPCH = true ;
1454- invocation->getLangOpts ()->CacheGeneratedPCH = true ;
14551454
14561455 clang::CompilerInstance emitInstance (
1457- Impl.Instance ->getPCHContainerOperations (),
1458- &Impl.Instance ->getModuleCache ());
1456+ Impl.Instance ->getPCHContainerOperations ());
14591457 emitInstance.setInvocation (std::move (invocation));
14601458 emitInstance.createDiagnostics (&Impl.Instance ->getDiagnosticClient (),
14611459 /* ShouldOwnClient=*/ false );
0 commit comments