clang-tools
11.0.0
|
SymbolSlab::Builder is a mutable container that can 'freeze' to SymbolSlab. More...
#include <Symbol.h>
Public Member Functions | |
Builder () | |
void | insert (const Symbol &S) |
Adds a symbol, overwriting any existing one with the same ID. More... | |
void | erase (const SymbolID &ID) |
Removes the symbol with an ID, if it exists. More... | |
const Symbol * | find (const SymbolID &ID) |
Returns the symbol with an ID, if it exists. Valid until insert/remove. More... | |
SymbolSlab | build () && |
Consumes the builder to finalize the slab. More... | |
SymbolSlab::Builder is a mutable container that can 'freeze' to SymbolSlab.
The frozen SymbolSlab will use less memory.
SymbolSlab clang::clangd::SymbolSlab::Builder::build | ( | ) | && |
Consumes the builder to finalize the slab.
Definition at line 54 of file Symbol.cpp.
References clang::clangd::Symbol::ID, clang::clangd::own(), Strings, and clang::clangd::SymbolSlab::SymbolSlab().
|
inline |
Returns the symbol with an ID, if it exists. Valid until insert/remove.
Definition at line 212 of file Symbol.h.
Referenced by clang::clangd::MergedIndex::lookup().
void clang::clangd::SymbolSlab::Builder::insert | ( | const Symbol & | S | ) |
Adds a symbol, overwriting any existing one with the same ID.
This is a deep copy: underlying strings will be owned by the slab.
Definition at line 50 of file Symbol.cpp.
References clang::clangd::Symbol::ID, and clang::clangd::own().
Referenced by clang::clangd::BackgroundIndexRebuilderTest::checkRebuild(), clang::clangd::MergedIndex::fuzzyFind(), clang::clangd::generateSymbols(), clang::clangd::FileShardedIndex::getShard(), and clang::clangd::MergedIndex::lookup().