[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 18 02:30:31 PDT 2019
kadircet created this revision.
kadircet added a reviewer: ilya-biryukov.
Herald added subscribers: cfe-commits, jdoerfert, arphaman, mgrang, jkorous, MaskRay, ioeric.
Herald added a project: clang.
For counting number of references clangd was relying on merging every
duplication of a symbol. Unfortunately this does not apply to FileIndex(and one
of its users' BackgroundIndex), since we get rid of duplication by simply
dropping symbols coming from non-canonical locations. So only one or two(coming
from canonical declaration header and defined source file, if exists)
replications of the same symbol reaches merging step.
This patch changes reference counting logic to rather count number of different
RefSlabs a given SymbolID exists.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D59481
Files:
clang-tools-extra/clangd/index/FileIndex.cpp
clang-tools-extra/unittests/clangd/BackgroundIndexTests.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59481.191061.patch
Type: text/x-patch
Size: 6628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190318/97e27130/attachment.bin>
More information about the cfe-commits
mailing list