clang 20.0.0git
|
This class is a shared cache, that caches the 'stat' and 'open' calls to the underlying real file system, and the scanned preprocessor directives of files. More...
#include "clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h"
Classes | |
struct | CacheShard |
Public Member Functions | |
DependencyScanningFilesystemSharedCache () | |
CacheShard & | getShardForFilename (StringRef Filename) const |
Returns shard for the given key. | |
CacheShard & | getShardForUID (llvm::sys::fs::UniqueID UID) const |
This class is a shared cache, that caches the 'stat' and 'open' calls to the underlying real file system, and the scanned preprocessor directives of files.
It is sharded based on the hash of the key to reduce the lock contention for the worker threads.
Definition at line 153 of file DependencyScanningFilesystem.h.
DependencyScanningFilesystemSharedCache::DependencyScanningFilesystemSharedCache | ( | ) |
Definition at line 85 of file DependencyScanningFilesystem.cpp.
DependencyScanningFilesystemSharedCache::CacheShard & DependencyScanningFilesystemSharedCache::getShardForFilename | ( | StringRef | Filename | ) | const |
Returns shard for the given key.
Definition at line 98 of file DependencyScanningFilesystem.cpp.
References Filename, and llvm::hash_value().
Referenced by clang::tooling::dependencies::DependencyScanningWorkerFilesystem::getRealPath().
DependencyScanningFilesystemSharedCache::CacheShard & DependencyScanningFilesystemSharedCache::getShardForUID | ( | llvm::sys::fs::UniqueID | UID | ) | const |
Definition at line 105 of file DependencyScanningFilesystem.cpp.