struct DependencyScanningFilesystemSharedCache::CacheShard
Declaration
struct DependencyScanningFilesystemSharedCache::CacheShard { /* full declaration omitted */ };
Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:153
Member Variables
- public std::mutex CacheLock
- The mutex that needs to be locked before mutation of any member.
- public llvm::StringMap<const CachedFileSystemEntry*, llvm::BumpPtrAllocator> EntriesByFilename
- Map from filenames to cached entries.
- public llvm::DenseMap<llvm::sys::fs::UniqueID, const CachedFileSystemEntry*> EntriesByUID
- Map from unique IDs to cached entries.
- public llvm::SpecificBumpPtrAllocator< CachedFileSystemEntry> EntryStorage
- The backing storage for cached entries.
- public llvm::SpecificBumpPtrAllocator<CachedFileContents> ContentsStorage
- The backing storage for cached contents.
Method Overview
- public const clang::tooling::dependencies::CachedFileSystemEntry * findEntryByFilename(llvm::StringRef Filename) const
- public const clang::tooling::dependencies::CachedFileSystemEntry * findEntryByUID(llvm::sys::fs::UniqueID UID) const
- public const clang::tooling::dependencies::CachedFileSystemEntry & getOrEmplaceEntryForFilename(llvm::StringRef Filename, llvm::ErrorOr<llvm::vfs::Status> Stat)
- public const clang::tooling::dependencies::CachedFileSystemEntry & getOrEmplaceEntryForUID(llvm::sys::fs::UniqueID UID, llvm::vfs::Status Stat, std::unique_ptr<llvm::MemoryBuffer> Contents)
- public const clang::tooling::dependencies::CachedFileSystemEntry & getOrInsertEntryForFilename(llvm::StringRef Filename, const clang::tooling::dependencies::CachedFileSystemEntry & Entry)
Methods
¶const clang::tooling::dependencies::
CachedFileSystemEntry*
findEntryByFilename(
llvm::StringRef Filename) const
const clang::tooling::dependencies::
CachedFileSystemEntry*
findEntryByFilename(
llvm::StringRef Filename) const
Description
Returns entry associated with the filename or nullptr if none is found.
Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:172
Parameters
- llvm::StringRef Filename
¶const clang::tooling::dependencies::
CachedFileSystemEntry*
findEntryByUID(
llvm::sys::fs::UniqueID UID) const
const clang::tooling::dependencies::
CachedFileSystemEntry*
findEntryByUID(
llvm::sys::fs::UniqueID UID) const
Description
Returns entry associated with the unique ID or nullptr if none is found.
Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:176
Parameters
¶const clang::tooling::dependencies::
CachedFileSystemEntry&
getOrEmplaceEntryForFilename(
llvm::StringRef Filename,
llvm::ErrorOr<llvm::vfs::Status> Stat)
const clang::tooling::dependencies::
CachedFileSystemEntry&
getOrEmplaceEntryForFilename(
llvm::StringRef Filename,
llvm::ErrorOr<llvm::vfs::Status> Stat)
Description
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.
Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:182
Parameters
- llvm::StringRef Filename
- llvm::ErrorOr<llvm::vfs::Status> Stat
¶const clang::tooling::dependencies::
CachedFileSystemEntry&
getOrEmplaceEntryForUID(
llvm::sys::fs::UniqueID UID,
llvm::vfs::Status Stat,
std::unique_ptr<llvm::MemoryBuffer>
Contents)
const clang::tooling::dependencies::
CachedFileSystemEntry&
getOrEmplaceEntryForUID(
llvm::sys::fs::UniqueID UID,
llvm::vfs::Status Stat,
std::unique_ptr<llvm::MemoryBuffer>
Contents)
Description
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.
Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:189
Parameters
- llvm::sys::fs::UniqueID UID
- llvm::vfs::Status Stat
- std::unique_ptr<llvm::MemoryBuffer> Contents
¶const clang::tooling::dependencies::
CachedFileSystemEntry&
getOrInsertEntryForFilename(
llvm::StringRef Filename,
const clang::tooling::dependencies::
CachedFileSystemEntry& Entry)
const clang::tooling::dependencies::
CachedFileSystemEntry&
getOrInsertEntryForFilename(
llvm::StringRef Filename,
const clang::tooling::dependencies::
CachedFileSystemEntry& Entry)
Description
Returns entry associated with the filename if there is some. Otherwise, associates the given entry with the filename and returns it.
Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:195
Parameters
- llvm::StringRef Filename
- const clang::tooling::dependencies:: CachedFileSystemEntry& Entry