diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2017-07-14 10:47:45 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2017-07-14 10:47:45 +0000 |
commit | 1c7fd213d5fa86593c18a45fa00a67a53dd36b5b (patch) | |
tree | 2bdbfdae6d0a714d9ff9e26166b9e94fe20fd37c /include/clang/Index/IndexingAction.h | |
parent | f0526fce681321909e4f3c1e6345fe7c184d1fb8 (diff) |
[index] Added a method indexTopLevelDecls to run indexing on a list of Decls.
Summary:
We need it in clangd for refactoring that replaces ASTUnit
with manual AST management.
Reviewers: akyrtzi, benlangmuir, arphaman, klimek
Reviewed By: arphaman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D35405
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308016 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Index/IndexingAction.h')
-rw-r--r-- | include/clang/Index/IndexingAction.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/clang/Index/IndexingAction.h b/include/clang/Index/IndexingAction.h index 8eed33c612..fb703be4e5 100644 --- a/include/clang/Index/IndexingAction.h +++ b/include/clang/Index/IndexingAction.h @@ -11,11 +11,14 @@ #define LLVM_CLANG_INDEX_INDEXINGACTION_H #include "clang/Basic/LLVM.h" +#include "llvm/ADT/ArrayRef.h" #include <memory> namespace clang { + class ASTContext; class ASTReader; class ASTUnit; + class Decl; class FrontendAction; namespace serialization { @@ -47,8 +50,11 @@ void indexASTUnit(ASTUnit &Unit, std::shared_ptr<IndexDataConsumer> DataConsumer, IndexingOptions Opts); -void indexModuleFile(serialization::ModuleFile &Mod, - ASTReader &Reader, +void indexTopLevelDecls(ASTContext &Ctx, ArrayRef<const Decl *> Decls, + std::shared_ptr<IndexDataConsumer> DataConsumer, + IndexingOptions Opts); + +void indexModuleFile(serialization::ModuleFile &Mod, ASTReader &Reader, std::shared_ptr<IndexDataConsumer> DataConsumer, IndexingOptions Opts); |