clang
10.0.0git
|
An in-memory representation of a file system entity that is of interest to the dependency scanning filesystem. More...
#include "clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h"
Public Member Functions | |
CachedFileSystemEntry () | |
Default constructor creates an entry with an invalid stat. More... | |
CachedFileSystemEntry (std::error_code Error) | |
bool | isValid () const |
bool | isDirectory () const |
llvm::ErrorOr< StringRef > | getContents () const |
llvm::ErrorOr< llvm::vfs::Status > | getStatus () const |
StringRef | getName () const |
const PreprocessorSkippedRangeMapping & | getPPSkippedRangeMapping () const |
Return the mapping between location -> distance that is used to speed up the block skipping in the preprocessor. More... | |
CachedFileSystemEntry (CachedFileSystemEntry &&)=default | |
CachedFileSystemEntry & | operator= (CachedFileSystemEntry &&)=default |
CachedFileSystemEntry (const CachedFileSystemEntry &)=delete | |
CachedFileSystemEntry & | operator= (const CachedFileSystemEntry &)=delete |
Static Public Member Functions | |
static CachedFileSystemEntry | createFileEntry (StringRef Filename, llvm::vfs::FileSystem &FS, bool Minimize=true) |
Create an entry that represents an opened source file with minimized or original contents. More... | |
static CachedFileSystemEntry | createDirectoryEntry (llvm::vfs::Status &&Stat) |
Create an entry that represents a directory on the filesystem. More... | |
An in-memory representation of a file system entity that is of interest to the dependency scanning filesystem.
It represents one of the following:
Definition at line 34 of file DependencyScanningFilesystem.h.
|
inline |
Default constructor creates an entry with an invalid stat.
Definition at line 37 of file DependencyScanningFilesystem.h.
Referenced by getPPSkippedRangeMapping().
|
inline |
Definition at line 39 of file DependencyScanningFilesystem.h.
References createFileEntry(), and Filename.
|
default |
|
delete |
|
static |
Create an entry that represents a directory on the filesystem.
Definition at line 95 of file DependencyScanningFilesystem.cpp.
|
static |
Create an entry that represents an opened source file with minimized or original contents.
The filesystem opens the file even for stat
calls open to avoid the issues with stat + open of minimized files that might lead to a mismatching size of the file. If file is not minimized, the full file is read and copied into memory to ensure that it's not memory mapped to avoid running out of file descriptors.
Definition at line 18 of file DependencyScanningFilesystem.cpp.
Referenced by CachedFileSystemEntry().
|
inline |
Definition at line 63 of file DependencyScanningFilesystem.h.
References isValid().
|
inline |
Definition at line 78 of file DependencyScanningFilesystem.h.
References isValid().
|
inline |
Return the mapping between location -> distance that is used to speed up the block skipping in the preprocessor.
Definition at line 85 of file DependencyScanningFilesystem.h.
References CachedFileSystemEntry(), and operator=().
|
inline |
Definition at line 72 of file DependencyScanningFilesystem.h.
References isValid().
|
inline |
Definition at line 60 of file DependencyScanningFilesystem.h.
|
inline |
Definition at line 57 of file DependencyScanningFilesystem.h.
Referenced by getContents(), getName(), getStatus(), and shouldCacheStatFailures().
|
default |
Referenced by getPPSkippedRangeMapping().
|
delete |