diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-03-09 17:33:56 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-03-09 17:33:56 +0000 |
commit | d28cf14aed192f83a38af4a07e6c14af97946947 (patch) | |
tree | ddb49b094b52b90d98ffefb1474cbc11ded3dfc7 /include/clang/Frontend/CompilerInstance.h | |
parent | 3a47836eebc2c0f1c5b69d5c9e189244cb9283ae (diff) |
Modules: Rename MemoryBufferCache to InMemoryModuleCache
Change MemoryBufferCache to InMemoryModuleCache, moving it from Basic to
Serialization. Another patch will start using it to manage module build
more explicitly, but this is split out because it's mostly mechanical.
Because of the move to Serialization we can no longer abuse the
Preprocessor to forward it to the ASTReader. Besides the rename and
file move, that means Preprocessor::Preprocessor has one fewer parameter
and ASTReader::ASTReader has one more.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index 002cc61eb4..2fc61574e3 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -44,7 +44,7 @@ class ExternalASTSource; class FileEntry; class FileManager; class FrontendAction; -class MemoryBufferCache; +class InMemoryModuleCache; class Module; class Preprocessor; class Sema; @@ -92,7 +92,7 @@ class CompilerInstance : public ModuleLoader { IntrusiveRefCntPtr<SourceManager> SourceMgr; /// The cache of PCM files. - IntrusiveRefCntPtr<MemoryBufferCache> PCMCache; + IntrusiveRefCntPtr<InMemoryModuleCache> ModuleCache; /// The preprocessor. std::shared_ptr<Preprocessor> PP; @@ -192,7 +192,7 @@ public: explicit CompilerInstance( std::shared_ptr<PCHContainerOperations> PCHContainerOps = std::make_shared<PCHContainerOperations>(), - MemoryBufferCache *SharedPCMCache = nullptr); + InMemoryModuleCache *SharedModuleCache = nullptr); ~CompilerInstance() override; /// @name High-Level Operations @@ -671,7 +671,8 @@ public: /// \return - The new object on success, or null on failure. static IntrusiveRefCntPtr<ASTReader> createPCHExternalASTSource( StringRef Path, StringRef Sysroot, bool DisablePCHValidation, - bool AllowPCHWithCompilerErrors, Preprocessor &PP, ASTContext &Context, + bool AllowPCHWithCompilerErrors, Preprocessor &PP, + InMemoryModuleCache &ModuleCache, ASTContext &Context, const PCHContainerReader &PCHContainerRdr, ArrayRef<std::shared_ptr<ModuleFileExtension>> Extensions, DependencyFileGenerator *DependencyFile, @@ -813,7 +814,7 @@ public: void setExternalSemaSource(IntrusiveRefCntPtr<ExternalSemaSource> ESS); - MemoryBufferCache &getPCMCache() const { return *PCMCache; } + InMemoryModuleCache &getModuleCache() const { return *ModuleCache; } }; } // end namespace clang |