diff options
| author | Sam McCall <sam.mccall@gmail.com> | 2018-09-03 14:37:43 +0000 |
|---|---|---|
| committer | Sam McCall <sam.mccall@gmail.com> | 2018-09-03 14:37:43 +0000 |
| commit | 9c7624e14beafe8c7b63b8360e496354665cafa4 (patch) | |
| tree | 9a765996132991118a2d6ec9a9fd04379ae2fa47 /clang/lib/Serialization/ModuleFileExtension.cpp | |
| parent | ca25b589575a216a25e9ca9a1ecfe0a5d61b0b45 (diff) | |
| download | bcm5719-llvm-9c7624e14beafe8c7b63b8360e496354665cafa4.tar.gz bcm5719-llvm-9c7624e14beafe8c7b63b8360e496354665cafa4.zip | |
[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
Diffstat (limited to 'clang/lib/Serialization/ModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions

