diff options
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index 8d0d939..9cd806c 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -11,6 +11,7 @@ #define LLVM_CLANG_FRONTEND_COMPILERINSTANCE_H_ #include "clang/AST/ASTConsumer.h" +#include "clang/Frontend/PCHContainerOperations.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/SourceManager.h" #include "clang/Frontend/CompilerInvocation.h" @@ -109,6 +110,9 @@ class CompilerInstance : public ModuleLoader { /// \brief The module dependency collector for crashdumps std::shared_ptr<ModuleDependencyCollector> ModuleDepCollector; + /// \brief The module provider. + std::shared_ptr<PCHContainerOperations> ThePCHContainerOperations; + /// \brief The dependency file generator. std::unique_ptr<DependencyFileGenerator> TheDependencyFileGenerator; @@ -172,7 +176,10 @@ class CompilerInstance : public ModuleLoader { CompilerInstance(const CompilerInstance &) = delete; void operator=(const CompilerInstance &) = delete; public: - explicit CompilerInstance(bool BuildingModule = false); + explicit CompilerInstance( + std::shared_ptr<PCHContainerOperations> PCHContainerOps = + std::make_shared<RawPCHContainerOperations>(), + bool BuildingModule = false); ~CompilerInstance() override; /// @name High-Level Operations @@ -492,6 +499,10 @@ public: void setModuleDepCollector( std::shared_ptr<ModuleDependencyCollector> Collector); + std::shared_ptr<PCHContainerOperations> getPCHContainerOperations() const { + return ThePCHContainerOperations; + } + /// } /// @name Code Completion /// { @@ -605,6 +616,7 @@ public: static IntrusiveRefCntPtr<ASTReader> createPCHExternalASTSource( StringRef Path, const std::string &Sysroot, bool DisablePCHValidation, bool AllowPCHWithCompilerErrors, Preprocessor &PP, ASTContext &Context, + const PCHContainerOperations &PCHContainerOps, void *DeserializationListener, bool OwnDeserializationListener, bool Preamble, bool UseGlobalModuleIndex); |