diff options
author | dim <dim@FreeBSD.org> | 2015-06-21 14:00:56 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-06-21 14:00:56 +0000 |
commit | 9dd834653b811ad20382e98a87dff824980c9916 (patch) | |
tree | a764184c2fc9486979b074250b013a0937ee64e5 /tools/libclang/CIndexer.h | |
parent | bb9760db9b86e93a638ed430d0a14785f7ff9064 (diff) | |
download | FreeBSD-src-9dd834653b811ad20382e98a87dff824980c9916.zip FreeBSD-src-9dd834653b811ad20382e98a87dff824980c9916.tar.gz |
Vendor import of clang trunk r240225:
https://llvm.org/svn/llvm-project/cfe/trunk@240225
Diffstat (limited to 'tools/libclang/CIndexer.h')
-rw-r--r-- | tools/libclang/CIndexer.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tools/libclang/CIndexer.h b/tools/libclang/CIndexer.h index cb7c62e..8a306cd 100644 --- a/tools/libclang/CIndexer.h +++ b/tools/libclang/CIndexer.h @@ -16,6 +16,8 @@ #define LLVM_CLANG_TOOLS_LIBCLANG_CINDEXER_H #include "clang-c/Index.h" +#include "clang/Frontend/PCHContainerOperations.h" +#include "clang/Lex/ModuleLoader.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Path.h" #include <vector> @@ -38,11 +40,14 @@ class CIndexer { unsigned Options; // CXGlobalOptFlags. std::string ResourcesPath; + std::shared_ptr<PCHContainerOperations> PCHContainerOps; public: - CIndexer() : OnlyLocalDecls(false), DisplayDiagnostics(false), - Options(CXGlobalOpt_None) { } - + CIndexer(std::shared_ptr<PCHContainerOperations> PCHContainerOps = + std::make_shared<RawPCHContainerOperations>()) + : OnlyLocalDecls(false), DisplayDiagnostics(false), + Options(CXGlobalOpt_None), PCHContainerOps(PCHContainerOps) {} + /// \brief Whether we only want to see "local" declarations (that did not /// come from a previous precompiled header). If false, we want to see all /// declarations. @@ -54,6 +59,10 @@ public: DisplayDiagnostics = Display; } + std::shared_ptr<PCHContainerOperations> getPCHContainerOperations() const { + return PCHContainerOps; + } + unsigned getCXGlobalOptFlags() const { return Options; } void setCXGlobalOptFlags(unsigned options) { Options = options; } |