Adapt llvmorg-10-init-12036-g3b9715cb2193: handleDeclOccurence -> handleDeclOccurrence

This commit is contained in:
Fangrui Song 2019-12-16 22:11:31 -08:00
parent cef0203484
commit 86e340caf0

View File

@ -678,10 +678,13 @@ public:
public:
IndexDataConsumer(IndexParam &param) : param(param) {}
void initialize(ASTContext &ctx) override { this->ctx = param.ctx = &ctx; }
bool handleDeclOccurence(const Decl *d, index::SymbolRoleSet roles,
ArrayRef<index::SymbolRelation> relations,
SourceLocation src_loc,
ASTNodeInfo ast_node) override {
#if LLVM_VERSION_MAJOR < 10 // llvmorg-10-init-12036-g3b9715cb219
# define handleDeclOccurrence handleDeclOccurence
#endif
bool handleDeclOccurrence(const Decl *d, index::SymbolRoleSet roles,
ArrayRef<index::SymbolRelation> relations,
SourceLocation src_loc,
ASTNodeInfo ast_node) override {
if (!param.no_linkage) {
if (auto *nd = dyn_cast<NamedDecl>(d); nd && nd->hasLinkage())
;