diff --git a/clang/include/clang/Frontend/CompilerInstance.h b/clang/include/clang/Frontend/CompilerInstance.h --- a/clang/include/clang/Frontend/CompilerInstance.h +++ b/clang/include/clang/Frontend/CompilerInstance.h @@ -515,7 +515,7 @@ /// { IntrusiveRefCntPtr getASTReader() const; - void setModuleManager(IntrusiveRefCntPtr Reader); + void setASTReader(IntrusiveRefCntPtr Reader); std::shared_ptr getModuleDepCollector() const; void setModuleDepCollector( @@ -781,7 +781,6 @@ return std::move(OutputStream); } - // Create module manager. void createASTReader(); bool loadModuleFile(StringRef FileName); diff --git a/clang/lib/Frontend/ChainedIncludesSource.cpp b/clang/lib/Frontend/ChainedIncludesSource.cpp --- a/clang/lib/Frontend/ChainedIncludesSource.cpp +++ b/clang/lib/Frontend/ChainedIncludesSource.cpp @@ -189,7 +189,7 @@ Clang->getASTConsumer().GetASTDeserializationListener()); if (!Reader) return nullptr; - Clang->setModuleManager(Reader); + Clang->setASTReader(Reader); Clang->getASTContext().setExternalSource(Reader); } diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -138,7 +138,7 @@ IntrusiveRefCntPtr CompilerInstance::getASTReader() const { return TheASTReader; } -void CompilerInstance::setModuleManager(IntrusiveRefCntPtr Reader) { +void CompilerInstance::setASTReader(IntrusiveRefCntPtr Reader) { assert(ModuleCache.get() == &Reader->getModuleManager().getModuleCache() && "Expected ASTReader to use the same PCM cache"); TheASTReader = std::move(Reader); @@ -379,7 +379,7 @@ void CompilerInstance::createPreprocessor(TranslationUnitKind TUKind) { const PreprocessorOptions &PPOpts = getPreprocessorOpts(); - // The module manager holds a reference to the old preprocessor (if any). + // The AST reader holds a reference to the old preprocessor (if any). TheASTReader.reset(); // Create the Preprocessor. diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -840,7 +840,7 @@ source = createChainedIncludesSource(CI, FinalReader); if (!source) goto failure; - CI.setModuleManager(static_cast(FinalReader.get())); + CI.setASTReader(static_cast(FinalReader.get())); CI.getASTContext().setExternalSource(source); } else if (CI.getLangOpts().Modules || !CI.getPreprocessorOpts().ImplicitPCHInclude.empty()) { @@ -870,7 +870,7 @@ if (!CI.getASTContext().getExternalSource()) goto failure; } - // If modules are enabled, create the module manager before creating + // If modules are enabled, create the AST reader before creating // any builtins, so that all declarations know that they might be // extended by an external source. if (CI.getLangOpts().Modules || !CI.hasASTContext() ||