15 #ifndef LLVM_CLANG_BASIC_FILESYSTEMSTATCACHE_H
16 #define LLVM_CLANG_BASIC_FILESYSTEMSTATCACHE_H
19 #include "llvm/ADT/StringMap.h"
20 #include "llvm/Support/FileSystem.h"
49 virtual void anchor();
71 static bool get(
const char *Path,
FileData &Data,
bool isFile,
96 std::unique_ptr<vfs::File> *F,
102 return Next->getStat(Path, Data, isFile, F, FS);
116 llvm::StringMap<FileData, llvm::BumpPtrAllocator>
StatCalls;
118 typedef llvm::StringMap<FileData, llvm::BumpPtrAllocator>::const_iterator
125 std::unique_ptr<vfs::File> *F,
TypePropertyCache< Private > Cache
We know the file exists and its cached stat data.
We know that the file doesn't exist.
The virtual file system interface.
Abstract interface for introducing a FileManager cache for 'stat' system calls, which is used by prec...
Represents the results of name lookup.
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...
virtual ~FileSystemStatCache()
virtual LookupResult getStat(const char *Path, FileData &Data, bool isFile, std::unique_ptr< vfs::File > *F, vfs::FileSystem &FS)=0
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
LookupResult statChained(const char *Path, FileData &Data, bool isFile, std::unique_ptr< vfs::File > *F, vfs::FileSystem &FS)
std::unique_ptr< FileSystemStatCache > NextStatCache
LookupResult getStat(const char *Path, FileData &Data, bool isFile, std::unique_ptr< vfs::File > *F, vfs::FileSystem &FS) override
A stat "cache" that can be used by FileManager to keep track of the results of stat() calls that occu...
llvm::StringMap< FileData, llvm::BumpPtrAllocator >::const_iterator iterator
FileSystemStatCache * getNextStatCache()
Retrieve the next stat call cache in the chain.