clang-tools 20.0.0git
|
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. | |
void | erase (const SymbolID &ID) |
Removes the symbol with an ID, if it exists. | |
const Symbol * | find (const SymbolID &ID) |
Returns the symbol with an ID, if it exists. Valid until insert/remove. | |
SymbolSlab | build () && |
Consumes the builder to finalize the slab. | |
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 56 of file Symbol.cpp.
References clang::clangd::Symbol::ID, and clang::clangd::SymbolSlab::SymbolSlab().
|
inline |
Removes the symbol with an ID, if it exists.
Definition at line 233 of file Symbol.h.
References ID.
Referenced by clang::clangd::SymbolCollector::finish().
Returns the symbol with an ID, if it exists. Valid until insert/remove.
Definition at line 236 of file Symbol.h.
References ID.
Referenced by clang::clangd::SymbolCollector::finish(), clang::clangd::SymbolCollector::handleDeclOccurrence(), and clang::clangd::SymbolCollector::handleMacroOccurrence().
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 52 of file Symbol.cpp.
References clang::clangd::own().
Referenced by clang::clangd::SymbolCollector::finish(), clang::clangd::MergedIndex::fuzzyFind(), clang::clangd::generateSymbols(), clang::clangd::FileShardedIndex::getShard(), clang::clangd::SymbolCollector::handleMacroOccurrence(), and clang::clangd::SymbolCollector::handleMacros().