llvm-project/clang-tools-extra/clangd/index/dex
Sam McCall 9c7624e14b [clangd] Factor out the data-swapping functionality from MemIndex/DexIndex.
Summary:
This is now handled by a wrapper class SwapIndex, so MemIndex/DexIndex can be
immutable and focus on their job.

Old and busted:
 I have a MemIndex, which holds a shared_ptr<vector<Symbol*>>, which keeps the
 symbol slab alive. I update by calling build(shared_ptr<vector<Symbol*>>).

New hotness: I have a SwapIndex, which holds a unique_ptr<SymbolIndex>, which
 holds a MemIndex, which holds a shared_ptr<void>, which keeps backing
 data alive.
 I update by building a new MemIndex and calling SwapIndex::reset().

Reviewers: kbobyrev, ioeric

Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, mgrang, arphaman, kadircet, cfe-commits

Differential Revision: https://reviews.llvm.org/D51422

llvm-svn: 341318
2018-09-03 14:37:43 +00:00
..
DexIndex.cpp [clangd] Factor out the data-swapping functionality from MemIndex/DexIndex. 2018-09-03 14:37:43 +00:00
DexIndex.h [clangd] Factor out the data-swapping functionality from MemIndex/DexIndex. 2018-09-03 14:37:43 +00:00
Iterator.cpp [NFC] Cleanup Dex 2018-08-31 09:17:02 +00:00
Iterator.h [clangd] Implement iterator cost 2018-08-30 11:23:58 +00:00
Token.h [clangd] DexIndex implementation prototype 2018-08-20 14:39:32 +00:00
Trigram.cpp [NFC] Cleanup Dex 2018-08-31 09:17:02 +00:00
Trigram.h [clangd] Fix many typos. NFC 2018-09-01 07:47:03 +00:00