clang-tools  14.0.0git
Classes | Public Member Functions | List of all members
clang::clangd::FileShardedIndex Struct Reference

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< IndexFileIngetShard (llvm::StringRef Uri) const
 Generates index shard for the Uri. More...
 

Detailed Description

Takes slabs coming from a TU (multiple files) and shards them per declaration location.

Definition at line 171 of file FileIndex.h.

Constructor & Destructor Documentation

◆ FileShardedIndex()

clang::clangd::FileShardedIndex::FileShardedIndex ( IndexFileIn  Input)
explicit

HintPath is used to convert file URIs stored in symbols into absolute paths.

Definition at line 124 of file FileIndex.cpp.

Member Function Documentation

◆ getAllSources()

std::vector< llvm::StringRef > clang::clangd::FileShardedIndex::getAllSources ( ) const

Returns uris for all files that has a shard.

Definition at line 179 of file FileIndex.cpp.

◆ getShard()

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 190 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::IndexFileIn::Refs, clang::clangd::IndexFileIn::Relations, clang::clangd::IndexFileIn::Sources, and clang::clangd::IndexFileIn::Symbols.


The documentation for this struct was generated from the following files: