|
clang 22.0.0git
|
#include "clang/DependencyScanning/DependencyScanningFilesystem.h"
Public Member Functions | |
| const CachedFileSystemEntry * | findEntryByFilename (StringRef Filename) const |
| Returns entry associated with the filename or nullptr if none is found. | |
| const CachedFileSystemEntry * | findEntryByUID (llvm::sys::fs::UniqueID UID) const |
| Returns entry associated with the unique ID or nullptr if none is found. | |
| const CachedFileSystemEntry & | getOrEmplaceEntryForFilename (StringRef Filename, llvm::ErrorOr< llvm::vfs::Status > Stat) |
| Returns entry associated with the filename if there is some. | |
| const CachedFileSystemEntry & | getOrEmplaceEntryForUID (llvm::sys::fs::UniqueID UID, llvm::vfs::Status Stat, std::unique_ptr< llvm::MemoryBuffer > Contents) |
| Returns entry associated with the unique ID if there is some. | |
| const CachedFileSystemEntry & | getOrInsertEntryForFilename (StringRef Filename, const CachedFileSystemEntry &Entry) |
| Returns entry associated with the filename if there is some. | |
| const CachedRealPath * | findRealPathByFilename (StringRef Filename) const |
| Returns the real path associated with the filename or nullptr if none is found. | |
| const CachedRealPath & | getOrEmplaceRealPathForFilename (StringRef Filename, llvm::ErrorOr< StringRef > RealPath) |
| Returns the real path associated with the filename if there is some. | |
Public Attributes | |
| std::mutex | CacheLock |
| The mutex that needs to be locked before mutation of any member. | |
| llvm::StringMap< std::pair< const CachedFileSystemEntry *, const CachedRealPath * >, llvm::BumpPtrAllocator > | CacheByFilename |
| Map from filenames to cached entries and real paths. | |
| llvm::DenseMap< llvm::sys::fs::UniqueID, const CachedFileSystemEntry * > | EntriesByUID |
| Map from unique IDs to cached entries. | |
| llvm::SpecificBumpPtrAllocator< CachedFileSystemEntry > | EntryStorage |
| The backing storage for cached entries. | |
| llvm::SpecificBumpPtrAllocator< CachedFileContents > | ContentsStorage |
| The backing storage for cached contents. | |
| llvm::SpecificBumpPtrAllocator< CachedRealPath > | RealPathStorage |
| The backing storage for cached real paths. | |
Definition at line 155 of file DependencyScanningFilesystem.h.
| const CachedFileSystemEntry * DependencyScanningFilesystemSharedCache::CacheShard::findEntryByFilename | ( | StringRef | Filename | ) | const |
Returns entry associated with the filename or nullptr if none is found.
Definition at line 154 of file DependencyScanningFilesystem.cpp.
References CacheByFilename, CacheLock, and clang::nullptr.
| const CachedFileSystemEntry * DependencyScanningFilesystemSharedCache::CacheShard::findEntryByUID | ( | llvm::sys::fs::UniqueID | UID | ) | const |
Returns entry associated with the unique ID or nullptr if none is found.
Definition at line 163 of file DependencyScanningFilesystem.cpp.
References CacheLock, EntriesByUID, and clang::nullptr.
| const CachedRealPath * DependencyScanningFilesystemSharedCache::CacheShard::findRealPathByFilename | ( | StringRef | Filename | ) | const |
Returns the real path associated with the filename or nullptr if none is found.
Definition at line 218 of file DependencyScanningFilesystem.cpp.
References CacheByFilename, CacheLock, and clang::nullptr.
| const CachedFileSystemEntry & DependencyScanningFilesystemSharedCache::CacheShard::getOrEmplaceEntryForFilename | ( | StringRef | Filename, |
| llvm::ErrorOr< llvm::vfs::Status > | Stat ) |
Returns entry associated with the filename if there is some.
Otherwise, constructs new one with the given status, associates it with the filename and returns the result.
Definition at line 171 of file DependencyScanningFilesystem.cpp.
References CacheByFilename, CacheLock, and EntryStorage.
| const CachedFileSystemEntry & DependencyScanningFilesystemSharedCache::CacheShard::getOrEmplaceEntryForUID | ( | llvm::sys::fs::UniqueID | UID, |
| llvm::vfs::Status | Stat, | ||
| std::unique_ptr< llvm::MemoryBuffer > | Contents ) |
Returns entry associated with the unique ID if there is some.
Otherwise, constructs new one with the given status and contents, associates it with the unique ID and returns the result.
Definition at line 188 of file DependencyScanningFilesystem.cpp.
References CacheLock, ContentsStorage, EntriesByUID, and EntryStorage.
| const CachedRealPath & DependencyScanningFilesystemSharedCache::CacheShard::getOrEmplaceRealPathForFilename | ( | StringRef | Filename, |
| llvm::ErrorOr< StringRef > | RealPath ) |
Returns the real path associated with the filename if there is some.
Otherwise, constructs new one with the given one, associates it with the filename and returns the result.
Definition at line 226 of file DependencyScanningFilesystem.cpp.
References CacheByFilename, CacheLock, and RealPathStorage.
| const CachedFileSystemEntry & DependencyScanningFilesystemSharedCache::CacheShard::getOrInsertEntryForFilename | ( | StringRef | Filename, |
| const CachedFileSystemEntry & | Entry ) |
Returns entry associated with the filename if there is some.
Otherwise, associates the given entry with the filename and returns it.
Definition at line 206 of file DependencyScanningFilesystem.cpp.
References CacheByFilename, and CacheLock.
| llvm::StringMap< std::pair<const CachedFileSystemEntry *, const CachedRealPath *>, llvm::BumpPtrAllocator> clang::dependencies::DependencyScanningFilesystemSharedCache::CacheShard::CacheByFilename |
Map from filenames to cached entries and real paths.
Definition at line 163 of file DependencyScanningFilesystem.h.
Referenced by findEntryByFilename(), findRealPathByFilename(), getOrEmplaceEntryForFilename(), getOrEmplaceRealPathForFilename(), getOrInsertEntryForFilename(), and clang::dependencies::DependencyScanningFilesystemSharedCache::getOutOfDateEntries().
|
mutable |
The mutex that needs to be locked before mutation of any member.
Definition at line 157 of file DependencyScanningFilesystem.h.
Referenced by findEntryByFilename(), findEntryByUID(), findRealPathByFilename(), getOrEmplaceEntryForFilename(), getOrEmplaceEntryForUID(), getOrEmplaceRealPathForFilename(), getOrInsertEntryForFilename(), and clang::dependencies::DependencyScanningFilesystemSharedCache::getOutOfDateEntries().
| llvm::SpecificBumpPtrAllocator<CachedFileContents> clang::dependencies::DependencyScanningFilesystemSharedCache::CacheShard::ContentsStorage |
The backing storage for cached contents.
Definition at line 173 of file DependencyScanningFilesystem.h.
Referenced by getOrEmplaceEntryForUID().
| llvm::DenseMap<llvm::sys::fs::UniqueID, const CachedFileSystemEntry *> clang::dependencies::DependencyScanningFilesystemSharedCache::CacheShard::EntriesByUID |
Map from unique IDs to cached entries.
Definition at line 167 of file DependencyScanningFilesystem.h.
Referenced by findEntryByUID(), and getOrEmplaceEntryForUID().
| llvm::SpecificBumpPtrAllocator<CachedFileSystemEntry> clang::dependencies::DependencyScanningFilesystemSharedCache::CacheShard::EntryStorage |
The backing storage for cached entries.
Definition at line 170 of file DependencyScanningFilesystem.h.
Referenced by getOrEmplaceEntryForFilename(), and getOrEmplaceEntryForUID().
| llvm::SpecificBumpPtrAllocator<CachedRealPath> clang::dependencies::DependencyScanningFilesystemSharedCache::CacheShard::RealPathStorage |
The backing storage for cached real paths.
Definition at line 176 of file DependencyScanningFilesystem.h.
Referenced by getOrEmplaceRealPathForFilename().