@@ -1022,7 +1022,7 @@ bool ClangImporter::canReadPCH(StringRef PCHFilename) {
10221022 // Note: Reusing the file manager is safe; this is a component that's already
10231023 // reused when building PCM files for the module cache.
10241024 CI.setVirtualFileSystem (Impl.Instance ->getVirtualFileSystemPtr ());
1025- CI.setFileManager (& Impl.Instance ->getFileManager ());
1025+ CI.setFileManager (Impl.Instance ->getFileManagerPtr ());
10261026 CI.createSourceManager ();
10271027 auto &clangSrcMgr = CI.getSourceManager ();
10281028 auto FID = clangSrcMgr.createFileID (
@@ -1409,7 +1409,6 @@ std::unique_ptr<ClangImporter> ClangImporter::create(
14091409 auto actualDiagClient = std::make_unique<ClangDiagnosticConsumer>(
14101410 importer->Impl , instance.getDiagnosticOpts (),
14111411 importerOpts.DumpClangDiagnostics );
1412-
14131412 instance.createVirtualFileSystem (std::move (VFS), actualDiagClient.get ());
14141413 instance.createFileManager ();
14151414 instance.createDiagnostics (actualDiagClient.release ());
@@ -1927,7 +1926,7 @@ std::string ClangImporter::getBridgingHeaderContents(
19271926 &Impl.Instance ->getModuleCache ());
19281927 rewriteInstance.setVirtualFileSystem (
19291928 Impl.Instance ->getVirtualFileSystemPtr ());
1930- rewriteInstance.setFileManager (& Impl.Instance ->getFileManager ());
1929+ rewriteInstance.setFileManager (Impl.Instance ->getFileManagerPtr ());
19311930 rewriteInstance.createDiagnostics (new clang::IgnoringDiagConsumer);
19321931 rewriteInstance.createSourceManager ();
19331932 rewriteInstance.setTarget (&Impl.Instance ->getTarget ());
@@ -1977,8 +1976,7 @@ std::string ClangImporter::getBridgingHeaderContents(
19771976 return " " ;
19781977 }
19791978
1980- if (auto fileInfo =
1981- rewriteInstance.getFileManager ().getOptionalFileRef (headerPath)) {
1979+ if (auto fileInfo = rewriteInstance.getFileManager ().getOptionalFileRef (headerPath)) {
19821980 fileSize = fileInfo->getSize ();
19831981 fileModTime = fileInfo->getModificationTime ();
19841982 }
@@ -2032,7 +2030,7 @@ ClangImporter::cloneCompilerInstanceForPrecompiling() {
20322030 &Impl.Instance ->getModuleCache ());
20332031 clonedInstance->setVirtualFileSystem (
20342032 Impl.Instance ->getVirtualFileSystemPtr ());
2035- clonedInstance->setFileManager (& Impl.Instance ->getFileManager ());
2033+ clonedInstance->setFileManager (Impl.Instance ->getFileManagerPtr ());
20362034 clonedInstance->createDiagnostics (&Impl.Instance ->getDiagnosticClient (),
20372035 /* ShouldOwnClient=*/ false );
20382036 clonedInstance->createSourceManager ();
0 commit comments