[PATCH] D50889: [clangd] Make FileIndex aware of the main file
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 17 03:22:47 PDT 2018
ilya-biryukov added a comment.
This is still WIP, but wanted to share anyway the progress anyway.
Need to fix the FIXMEs currently added to the code and add tests.
================
Comment at: clangd/index/FileIndex.cpp:81
if (!Slab)
FileToSlabs.erase(Path);
else
----------------
We need to be more careful here now that we have to slabs in the list. Should only erase when both are removed.
================
Comment at: clangd/index/FileIndex.cpp:87
+void FileSymbols::updateMainFile(PathRef Path, SymbolSlab::Builder Builder) {
+ // FIXME(ibiryukov): most of this work should be done outside the lock.
+ std::lock_guard<std::mutex> Lock(Mutex);
----------------
This should definitely be done outside the lock, only the actual swap of the symbol tables should be there.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50889
More information about the cfe-commits
mailing list