clang-tools
11.0.0
|
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. More... | |
std::vector< llvm::StringRef > | getAllSources () const |
Returns uris for all files that has a shard. More... | |
llvm::Optional< IndexFileIn > | getShard (llvm::StringRef Uri) const |
Generates index shard for the Uri . More... | |
Takes slabs coming from a TU (multiple files) and shards them per declaration location.
Definition at line 165 of file FileIndex.h.
|
explicit |
HintPath
is used to convert file URIs stored in symbols into absolute paths.
Definition at line 120 of file FileIndex.cpp.
std::vector< llvm::StringRef > clang::clangd::FileShardedIndex::getAllSources | ( | ) | const |
Returns uris for all files that has a shard.
Definition at line 167 of file FileIndex.cpp.
llvm::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 178 of file FileIndex.cpp.
References clang::clangd::IndexFileIn::Cmd, clang::clangd::RelationSlab::Builder::insert(), clang::clangd::RefSlab::Builder::insert(), clang::clangd::SymbolSlab::Builder::insert(), clang::clangd::None, clang::clangd::IndexFileIn::Refs, clang::clangd::IndexFileIn::Relations, clang::clangd::IndexFileIn::Sources, and clang::clangd::IndexFileIn::Symbols.