diff options
author | Eric Liu <ioeric@google.com> | 2017-12-07 11:04:24 +0000 |
---|---|---|
committer | Eric Liu <ioeric@google.com> | 2017-12-07 11:04:24 +0000 |
commit | cbe186c3f129d6fc6f989cec1c9960d6b3d0b914 (patch) | |
tree | 830608ed1e97b1bc3390f1ed39e4c555427fe962 /include/clang/Index | |
parent | 58744ab311fae8a49ce39322ff72d37cb140c6bd (diff) | |
download | clang-cbe186c3f129d6fc6f989cec1c9960d6b3d0b914.tar.gz |
[Index] Add setPreprocessor member to IndexDataConsumer.
Summary:
This enables us to use information in Preprocessor when handling symbol
occurrences.
Reviewers: arphaman, hokein
Reviewed By: hokein
Subscribers: malaperle, cfe-commits
Differential Revision: https://reviews.llvm.org/D40884
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320030 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Index')
-rw-r--r-- | include/clang/Index/IndexDataConsumer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Index/IndexDataConsumer.h b/include/clang/Index/IndexDataConsumer.h index 3154370483..080f4cb4d0 100644 --- a/include/clang/Index/IndexDataConsumer.h +++ b/include/clang/Index/IndexDataConsumer.h @@ -11,6 +11,7 @@ #define LLVM_CLANG_INDEX_INDEXDATACONSUMER_H #include "clang/Index/IndexSymbol.h" +#include "clang/Lex/Preprocessor.h" namespace clang { class ASTContext; @@ -36,6 +37,8 @@ public: virtual void initialize(ASTContext &Ctx) {} + virtual void setPreprocessor(std::shared_ptr<Preprocessor> PP) {} + /// \returns true to continue indexing, or false to abort. virtual bool handleDeclOccurence(const Decl *D, SymbolRoleSet Roles, ArrayRef<SymbolRelation> Relations, |