[PATCH] D52078: [clangd] Store preamble macros in dynamic index.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 14 04:01:53 PDT 2018
ilya-biryukov added a comment.
~1% increase in memory usage seems totally fine. Actually surprised it's that small.
Overall LG, just a single comment about extra copying. Thanks for the change, looks like a great improvement!
================
Comment at: clangd/index/FileIndex.cpp:84
+ Merged.insert(Macro);
+ for (const auto &Sym : Collector.takeSymbols())
+ Merged.insert(Sym);
----------------
Why make an extra copy of the symbols? Why not add macros to the same builder used in collector?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D52078
More information about the cfe-commits
mailing list