15 #ifndef LLVM_CLANG_BASIC_FILESYSTEMSTATCACHE_H 16 #define LLVM_CLANG_BASIC_FILESYSTEMSTATCACHE_H 19 #include "llvm/ADT/StringMap.h" 20 #include "llvm/ADT/StringRef.h" 21 #include "llvm/Support/Allocator.h" 22 #include "llvm/Support/FileSystem.h" 44 bool IsDirectory =
false;
45 bool IsNamedPipe =
false;
49 bool IsVFSMapped =
false;
58 virtual void anchor();
84 static bool get(StringRef Path,
FileData &Data,
bool isFile,
91 NextStatCache = std::move(Cache);
101 return std::move(NextStatCache);
109 std::unique_ptr<vfs::File> *F,
115 return Next->getStat(Path, Data, isFile, F, FS);
119 return get(Path, Data, isFile, F,
nullptr, FS) ? CacheMissing : CacheExists;
129 llvm::StringMap<FileData, llvm::BumpPtrAllocator>
StatCalls;
132 llvm::StringMap<FileData, llvm::BumpPtrAllocator>::const_iterator;
138 std::unique_ptr<vfs::File> *F,
144 #endif // LLVM_CLANG_BASIC_FILESYSTEMSTATCACHE_H TypePropertyCache< Private > Cache
LookupResult statChained(StringRef Path, FileData &Data, bool isFile, std::unique_ptr< vfs::File > *F, vfs::FileSystem &FS)
We know the file exists and its cached stat data.
The virtual file system interface.
llvm::StringMap< FileData, llvm::BumpPtrAllocator >::const_iterator iterator
Abstract interface for introducing a FileManager cache for 'stat' system calls, which is used by prec...
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
std::unique_ptr< FileSystemStatCache > takeNextStatCache()
Retrieve the next stat call cache in the chain, transferring ownership of this cache (and...
static bool get(StringRef Path, FileData &Data, bool isFile, std::unique_ptr< vfs::File > *F, FileSystemStatCache *Cache, vfs::FileSystem &FS)
Get the 'stat' information for the specified path, using the cache to accelerate it if possible...
llvm::StringMap< FileData, llvm::BumpPtrAllocator > StatCalls
The set of stat() calls that have been seen.
void setNextStatCache(std::unique_ptr< FileSystemStatCache > Cache)
Sets the next stat call cache in the chain of stat caches.
llvm::sys::fs::UniqueID UniqueID
Dataflow Directional Tag Classes.
std::unique_ptr< FileSystemStatCache > NextStatCache
A stat "cache" that can be used by FileManager to keep track of the results of stat() calls that occu...
FileSystemStatCache * getNextStatCache()
Retrieve the next stat call cache in the chain.