diff options
Diffstat (limited to 'clang/include/clang/Frontend/CompilerInstance.h')
-rw-r--r-- | clang/include/clang/Frontend/CompilerInstance.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/include/clang/Frontend/CompilerInstance.h b/clang/include/clang/Frontend/CompilerInstance.h index 91d9198ddf6..bdcec5470a5 100644 --- a/clang/include/clang/Frontend/CompilerInstance.h +++ b/clang/include/clang/Frontend/CompilerInstance.h @@ -44,6 +44,7 @@ class ExternalASTSource; class FileEntry; class FileManager; class FrontendAction; +class MemoryBufferCache; class Module; class Preprocessor; class Sema; @@ -90,6 +91,9 @@ class CompilerInstance : public ModuleLoader { /// The source manager. IntrusiveRefCntPtr<SourceManager> SourceMgr; + /// The cache of PCM files. + IntrusiveRefCntPtr<MemoryBufferCache> PCMCache; + /// The preprocessor. std::shared_ptr<Preprocessor> PP; @@ -178,7 +182,7 @@ public: explicit CompilerInstance( std::shared_ptr<PCHContainerOperations> PCHContainerOps = std::make_shared<PCHContainerOperations>(), - bool BuildingModule = false); + MemoryBufferCache *SharedPCMCache = nullptr); ~CompilerInstance() override; /// @name High-Level Operations @@ -783,6 +787,8 @@ public: } void setExternalSemaSource(IntrusiveRefCntPtr<ExternalSemaSource> ESS); + + MemoryBufferCache &getPCMCache() const { return *PCMCache; } }; } // end namespace clang |