clang 18.0.0git
|
A virtual file system optimized for the dependency discovery. More...
#include "clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h"
Public Member Functions | |
DependencyScanningWorkerFilesystem (DependencyScanningFilesystemSharedCache &SharedCache, IntrusiveRefCntPtr< llvm::vfs::FileSystem > FS) | |
llvm::ErrorOr< llvm::vfs::Status > | status (const Twine &Path) override |
llvm::ErrorOr< std::unique_ptr< llvm::vfs::File > > | openFileForRead (const Twine &Path) override |
std::error_code | setCurrentWorkingDirectory (const Twine &Path) override |
llvm::ErrorOr< EntryRef > | getOrCreateFileSystemEntry (StringRef Filename, bool DisableDirectivesScanning=false) |
Returns entry for the given filename. | |
A virtual file system optimized for the dependency discovery.
It is primarily designed to work with source files whose contents was preprocessed to remove any tokens that are unlikely to affect the dependency computation.
This is not a thread safe VFS. A single instance is meant to be used only in one thread. Multiple instances are allowed to service multiple threads running in parallel.
Definition at line 283 of file DependencyScanningFilesystem.h.
DependencyScanningWorkerFilesystem::DependencyScanningWorkerFilesystem | ( | DependencyScanningFilesystemSharedCache & | SharedCache, |
IntrusiveRefCntPtr< llvm::vfs::FileSystem > | FS | ||
) |
Definition at line 194 of file DependencyScanningFilesystem.cpp.
llvm::ErrorOr< EntryRef > DependencyScanningWorkerFilesystem::getOrCreateFileSystemEntry | ( | StringRef | Filename, |
bool | DisableDirectivesScanning = false |
||
) |
Returns entry for the given filename.
Attempts to use the local and shared caches first, then falls back to using the underlying filesystem.
Definition at line 259 of file DependencyScanningFilesystem.cpp.
References clang::tooling::dependencies::EntryRef::unwrapError().
Referenced by openFileForRead(), and status().
|
override |
Definition at line 349 of file DependencyScanningFilesystem.cpp.
References Filename, getOrCreateFileSystemEntry(), and clang::Result.
|
override |
Definition at line 362 of file DependencyScanningFilesystem.cpp.
|
override |
Definition at line 289 of file DependencyScanningFilesystem.cpp.
References Filename, getOrCreateFileSystemEntry(), and clang::Result.