clang: include/clang/Basic/FileSystemStatCache.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_CLANG_BASIC_FILESYSTEMSTATCACHE_H
15#define LLVM_CLANG_BASIC_FILESYSTEMSTATCACHE_H
16
18#include "llvm/ADT/StringMap.h"
19#include "llvm/ADT/StringRef.h"
20#include "llvm/Support/Allocator.h"
21#include "llvm/Support/FileSystem.h"
22#include "llvm/Support/VirtualFileSystem.h"
23#include
24#include
25#include
26#include
27#include
28#include
29
31
32
33
34
36 virtual void anchor();
37
38public:
40
41
42
43
44
45
46
47
48
49
50
51 static std::error_code get(StringRef Path, llvm::vfs::Status &Status,
52 bool isFile, std::unique_ptrllvm::vfs::File *F,
54 llvm::vfs::FileSystem &FS, bool IsText = true);
55
56protected:
57
58
59
60 virtual std::error_code getStat(StringRef Path, llvm::vfs::Status &Status,
61 bool isFile,
62 std::unique_ptrllvm::vfs::File *F,
63 llvm::vfs::FileSystem &FS) = 0;
64};
65
66
67
68
70public:
71
72 llvm::StringMap<llvm::vfs::Status, llvm::BumpPtrAllocator> StatCalls;
73
75 llvm::StringMap<llvm::vfs::Status,
76 llvm::BumpPtrAllocator>::const_iterator;
77
80
81 std::error_code getStat(StringRef Path, llvm::vfs::Status &Status,
82 bool isFile,
83 std::unique_ptrllvm::vfs::File *F,
84 llvm::vfs::FileSystem &FS) override;
85};
86
87}
88
89#endif
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
TypePropertyCache< Private > Cache
Abstract interface for introducing a FileManager cache for 'stat' system calls, which is used by prec...
virtual ~FileSystemStatCache()=default
static std::error_code get(StringRef Path, llvm::vfs::Status &Status, bool isFile, std::unique_ptr< llvm::vfs::File > *F, FileSystemStatCache *Cache, llvm::vfs::FileSystem &FS, bool IsText=true)
Get the 'stat' information for the specified path, using the cache to accelerate it if possible.
virtual std::error_code getStat(StringRef Path, llvm::vfs::Status &Status, bool isFile, std::unique_ptr< llvm::vfs::File > *F, llvm::vfs::FileSystem &FS)=0
A stat "cache" that can be used by FileManager to keep track of the results of stat() calls that occu...
llvm::StringMap< llvm::vfs::Status, llvm::BumpPtrAllocator > StatCalls
The set of stat() calls that have been seen.
std::error_code getStat(StringRef Path, llvm::vfs::Status &Status, bool isFile, std::unique_ptr< llvm::vfs::File > *F, llvm::vfs::FileSystem &FS) override
llvm::StringMap< llvm::vfs::Status, llvm::BumpPtrAllocator >::const_iterator iterator
The JSON file list parser is used to communicate input to InstallAPI.