summaryrefslogtreecommitdiffstats
path: root/include/clang/Index/IndexingAction.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2016-02-12 23:10:59 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2016-02-12 23:10:59 +0000
commit754b721c2005bfe3c417e3b6bb06b77e840db131 (patch)
tree567a75431352a13fc3fe2becd60dde8f6fed6ddc /include/clang/Index/IndexingAction.h
parent24d973f5ae51e14140784761a6bfc8c0cb524d9e (diff)
[libclang] Separate the underlying indexing functionality of libclang and introduce it into the clangIndex library.
It is a general goodness for libclang itself to mostly be a wrapper of functionality provided by the libraries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Index/IndexingAction.h')
-rw-r--r--include/clang/Index/IndexingAction.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/clang/Index/IndexingAction.h b/include/clang/Index/IndexingAction.h
new file mode 100644
index 0000000000..dfc363a049
--- /dev/null
+++ b/include/clang/Index/IndexingAction.h
@@ -0,0 +1,47 @@
+//===--- IndexingAction.h - Frontend index action -------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_INDEX_INDEXINGACTION_H
+#define LLVM_CLANG_INDEX_INDEXINGACTION_H
+
+#include "clang/Basic/LLVM.h"
+#include <memory>
+
+namespace clang {
+ class ASTUnit;
+ class FrontendAction;
+
+namespace index {
+ class IndexDataConsumer;
+
+struct IndexingOptions {
+ enum class SystemSymbolFilterKind {
+ None,
+ DeclarationsOnly,
+ All,
+ };
+
+ SystemSymbolFilterKind SystemSymbolFilter
+ = SystemSymbolFilterKind::DeclarationsOnly;
+ bool IndexFunctionLocals = false;
+};
+
+std::unique_ptr<FrontendAction>
+createIndexingAction(std::unique_ptr<FrontendAction> WrappedAction,
+ std::shared_ptr<IndexDataConsumer> DataConsumer,
+ IndexingOptions Opts);
+
+void indexASTUnit(ASTUnit &Unit,
+ std::shared_ptr<IndexDataConsumer> DataConsumer,
+ IndexingOptions Opts);
+
+} // namespace index
+} // namespace clang
+
+#endif