clang-tools
8.0.0
|
#include <Background.h>
Public Member Functions | |
BackgroundIndex (Context BackgroundContext, const FileSystemProvider &, const GlobalCompilationDatabase &CDB, BackgroundIndexStorage::Factory IndexStorageFactory, size_t BuildIndexPeriodMs=0, size_t ThreadPoolSize=llvm::heavyweight_hardware_concurrency()) | |
If BuildIndexPeriodMs is greater than 0, the symbol index will only be rebuilt periodically (one per BuildIndexPeriodMs ); otherwise, index is rebuilt for each indexed file. More... | |
~BackgroundIndex () | |
void | enqueue (const std::vector< std::string > &ChangedFiles) |
void | stop () |
LLVM_NODISCARD bool | blockUntilIdleForTest (llvm::Optional< double > TimeoutSeconds=10) |
![]() | |
SwapIndex (std::unique_ptr< SymbolIndex > Index=nullptr) | |
void | reset (std::unique_ptr< SymbolIndex >) |
bool | fuzzyFind (const FuzzyFindRequest &, llvm::function_ref< void(const Symbol &)>) const override |
Matches symbols in the index fuzzily and applies Callback on each matched symbol before returning. More... | |
void | lookup (const LookupRequest &, llvm::function_ref< void(const Symbol &)>) const override |
Looks up symbols with any of the given symbol IDs and applies Callback on each matched symbol. More... | |
void | refs (const RefsRequest &, llvm::function_ref< void(const Ref &)>) const override |
Finds all occurrences (e.g. More... | |
size_t | estimateMemoryUsage () const override |
Returns estimated size of index (in bytes). More... | |
![]() | |
virtual | ~SymbolIndex ()=default |
Definition at line 66 of file Background.h.
clang::clangd::BackgroundIndex::BackgroundIndex | ( | Context | BackgroundContext, |
const FileSystemProvider & | FSProvider, | ||
const GlobalCompilationDatabase & | CDB, | ||
BackgroundIndexStorage::Factory | IndexStorageFactory, | ||
size_t | BuildIndexPeriodMs = 0 , |
||
size_t | ThreadPoolSize = llvm::heavyweight_hardware_concurrency() |
||
) |
If BuildIndexPeriodMs is greater than 0, the symbol index will only be rebuilt periodically (one per BuildIndexPeriodMs
); otherwise, index is rebuilt for each indexed file.
Definition at line 129 of file Background.cpp.
References enqueue(), and clang::clangd::log().
clang::clangd::BackgroundIndex::~BackgroundIndex | ( | ) |
Definition at line 154 of file Background.cpp.
References stop().
bool clang::clangd::BackgroundIndex::blockUntilIdleForTest | ( | llvm::Optional< double > | TimeoutSeconds = 10 | ) |
Definition at line 203 of file Background.cpp.
References clang::clangd::timeoutSeconds(), and clang::clangd::wait().
void clang::clangd::BackgroundIndex::enqueue | ( | const std::vector< std::string > & | ChangedFiles | ) |
Definition at line 210 of file Background.cpp.
Referenced by BackgroundIndex().
void clang::clangd::BackgroundIndex::stop | ( | ) |
Definition at line 160 of file Background.cpp.
References clang::clangd::Context::clone(), clang::clangd::Normal, and clang::clangd::setCurrentThreadPriority().
Referenced by ~BackgroundIndex().