1 //===--- IndexingAction.h - Frontend index action -------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_CLANG_INDEX_INDEXINGACTION_H
11 #define LLVM_CLANG_INDEX_INDEXINGACTION_H
13 #include "clang/Basic/LLVM.h"
14 #include "llvm/ADT/ArrayRef.h"
24 namespace serialization {
29 class IndexDataConsumer;
31 struct IndexingOptions {
32 enum class SystemSymbolFilterKind {
38 SystemSymbolFilterKind SystemSymbolFilter
39 = SystemSymbolFilterKind::DeclarationsOnly;
40 bool IndexFunctionLocals = false;
43 /// \param WrappedAction another frontend action to wrap over or null.
44 std::unique_ptr<FrontendAction>
45 createIndexingAction(std::shared_ptr<IndexDataConsumer> DataConsumer,
47 std::unique_ptr<FrontendAction> WrappedAction);
49 void indexASTUnit(ASTUnit &Unit,
50 std::shared_ptr<IndexDataConsumer> DataConsumer,
51 IndexingOptions Opts);
53 void indexTopLevelDecls(ASTContext &Ctx, ArrayRef<const Decl *> Decls,
54 std::shared_ptr<IndexDataConsumer> DataConsumer,
55 IndexingOptions Opts);
57 void indexModuleFile(serialization::ModuleFile &Mod, ASTReader &Reader,
58 std::shared_ptr<IndexDataConsumer> DataConsumer,
59 IndexingOptions Opts);