• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===--- IndexingAction.h - Frontend index action -------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_CLANG_INDEX_INDEXINGACTION_H
11 #define LLVM_CLANG_INDEX_INDEXINGACTION_H
12 
13 #include "clang/Basic/LLVM.h"
14 #include <memory>
15 
16 namespace clang {
17   class ASTUnit;
18   class FrontendAction;
19 
20 namespace index {
21   class IndexDataConsumer;
22 
23 struct IndexingOptions {
24   enum class SystemSymbolFilterKind {
25     None,
26     DeclarationsOnly,
27     All,
28   };
29 
30   SystemSymbolFilterKind SystemSymbolFilter
31     = SystemSymbolFilterKind::DeclarationsOnly;
32   bool IndexFunctionLocals = false;
33 };
34 
35 /// \param WrappedAction another frontend action to wrap over or null.
36 std::unique_ptr<FrontendAction>
37 createIndexingAction(std::shared_ptr<IndexDataConsumer> DataConsumer,
38                      IndexingOptions Opts,
39                      std::unique_ptr<FrontendAction> WrappedAction);
40 
41 void indexASTUnit(ASTUnit &Unit,
42                   std::shared_ptr<IndexDataConsumer> DataConsumer,
43                   IndexingOptions Opts);
44 
45 } // namespace index
46 } // namespace clang
47 
48 #endif
49