clang-tools 20.0.0git
|
Takes slabs coming from a TU (multiple files) and shards them per declaration location. More...
#include <FileIndex.h>
Public Member Functions | |
FileShardedIndex (IndexFileIn Input) | |
HintPath is used to convert file URIs stored in symbols into absolute paths. | |
std::vector< llvm::StringRef > | getAllSources () const |
Returns uris for all files that has a shard. | |
std::optional< IndexFileIn > | getShard (llvm::StringRef Uri) const |
Generates index shard for the Uri . | |
Takes slabs coming from a TU (multiple files) and shards them per declaration location.
Definition at line 171 of file FileIndex.h.
|
explicit |
HintPath
is used to convert file URIs stored in symbols into absolute paths.
Definition at line 127 of file FileIndex.cpp.
References clang::clangd::IndexFileIn::Refs, clang::clangd::IndexFileIn::Relations, clang::clangd::IndexFileIn::Sources, and clang::clangd::IndexFileIn::Symbols.
std::vector< llvm::StringRef > clang::clangd::FileShardedIndex::getAllSources | ( | ) | const |
Returns uris for all files that has a shard.
Definition at line 182 of file FileIndex.cpp.
Referenced by clang::clangd::FileIndex::updatePreamble().
std::optional< IndexFileIn > clang::clangd::FileShardedIndex::getShard | ( | llvm::StringRef | Uri | ) | const |
Generates index shard for the Uri
.
Note that this function results in a copy of all the relevant data. Returned index will always have Symbol/Refs/Relation Slabs set, even if they are empty.
Definition at line 193 of file FileIndex.cpp.
References clang::clangd::IndexFileIn::Cmd, clang::clangd::RelationSlab::Builder::insert(), clang::clangd::SymbolSlab::Builder::insert(), clang::clangd::RefSlab::Builder::insert(), clang::clangd::IndexFileIn::Refs, clang::clangd::IndexFileIn::Relations, clang::clangd::IndexFileIn::Sources, and clang::clangd::IndexFileIn::Symbols.
Referenced by clang::clangd::FileIndex::updatePreamble().