|
clang-tools 22.0.0git
|
#include <Background.h>
Classes | |
| struct | Options |
Public Member Functions | |
| BackgroundIndex (const ThreadsafeFS &, const GlobalCompilationDatabase &CDB, BackgroundIndexStorage::Factory IndexStorageFactory, Options Opts) | |
| Creates a new background index and starts its threads. | |
| ~BackgroundIndex () | |
| void | enqueue (const std::vector< std::string > &ChangedFiles) |
| void | boostRelated (llvm::StringRef Path) |
| Boosts priority of indexing related to Path. | |
| void | stop () |
| bool | blockUntilIdleForTest (std::optional< double > TimeoutSeconds=10) |
| void | profile (MemoryTree &MT) const |
| Public Member Functions inherited from clang::clangd::SwapIndex | |
| 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. | |
| 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. | |
| bool | refs (const RefsRequest &, llvm::function_ref< void(const Ref &)>) const override |
| Finds all occurrences (e.g. | |
| bool | containedRefs (const ContainedRefsRequest &, llvm::function_ref< void(const ContainedRefsResult &)>) const override |
Find all symbols that are referenced by a symbol and apply Callback on each result. | |
| void | relations (const RelationsRequest &, llvm::function_ref< void(const SymbolID &, const Symbol &)>) const override |
| void | reverseRelations (const RelationsRequest &, llvm::function_ref< void(const SymbolID &, const Symbol &)>) const override |
| llvm::unique_function< IndexContents(llvm::StringRef) const > | indexedFiles () const override |
| size_t | estimateMemoryUsage () const override |
| Returns estimated size of index (in bytes). | |
| Public Member Functions inherited from clang::clangd::SymbolIndex | |
| virtual | ~SymbolIndex ()=default |
| virtual void | relations (const RelationsRequest &Req, llvm::function_ref< void(const SymbolID &Subject, const Symbol &Object)> Callback) const =0 |
Finds all relations (S, P, O) stored in the index such that S is among Req.Subjects and P is Req.Predicate, and invokes Callback for (S, O) in each. | |
| virtual void | reverseRelations (const RelationsRequest &Req, llvm::function_ref< void(const SymbolID &Subject, const Symbol &Object)> Callback) const =0 |
Finds all relations (O, P, S) stored in the index such that S is among Req.Subjects and P is Req.Predicate, and invokes Callback for (S, O) in each. | |
Additional Inherited Members | |
| Public Types inherited from clang::clangd::SymbolIndex | |
| using | IndexedFiles |
| Returns function which checks if the specified file was used to build this index or not. | |
Definition at line 134 of file Background.h.
| clang::clangd::BackgroundIndex::BackgroundIndex | ( | const ThreadsafeFS & | TFS, |
| const GlobalCompilationDatabase & | CDB, | ||
| BackgroundIndexStorage::Factory | IndexStorageFactory, | ||
| Options | Opts ) |
Creates a new background index and starts its threads.
The current Context will be propagated to each worker thread.
Definition at line 93 of file Background.cpp.
References clang::clangd::All, enqueue(), and clang::clangd::SwapIndex::SwapIndex().
| clang::clangd::BackgroundIndex::~BackgroundIndex | ( | ) |
Definition at line 119 of file Background.cpp.
References stop().
|
inlinenodiscard |
Definition at line 180 of file Background.h.
| void clang::clangd::BackgroundIndex::boostRelated | ( | llvm::StringRef | Path | ) |
Boosts priority of indexing related to Path.
Typically used to index TUs when headers are opened.
Definition at line 178 of file Background.cpp.
References clang::clangd::filenameWithoutExtension(), and clang::clangd::isHeaderFile().
|
inline |
Definition at line 163 of file Background.h.
Referenced by BackgroundIndex().
| void clang::clangd::BackgroundIndex::profile | ( | MemoryTree & | MT | ) | const |
Definition at line 423 of file Background.cpp.
References clang::clangd::MemoryTree::addUsage(), clang::clangd::MemoryTree::child(), and clang::clangd::SwapIndex::estimateMemoryUsage().
|
inline |
Definition at line 173 of file Background.h.
Referenced by ~BackgroundIndex().