diff options
Diffstat (limited to 'clang/lib/Basic/FileSystemStatCache.cpp')
-rw-r--r-- | clang/lib/Basic/FileSystemStatCache.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/clang/lib/Basic/FileSystemStatCache.cpp b/clang/lib/Basic/FileSystemStatCache.cpp index f5856cb..9a515e8 100644 --- a/clang/lib/Basic/FileSystemStatCache.cpp +++ b/clang/lib/Basic/FileSystemStatCache.cpp @@ -12,17 +12,17 @@ //===----------------------------------------------------------------------===// #include "clang/Basic/FileSystemStatCache.h" -#include "clang/Basic/VirtualFileSystem.h" #include "llvm/Support/Chrono.h" #include "llvm/Support/ErrorOr.h" #include "llvm/Support/Path.h" +#include "llvm/Support/VirtualFileSystem.h" #include <utility> using namespace clang; void FileSystemStatCache::anchor() {} -static void copyStatusToFileData(const vfs::Status &Status, +static void copyStatusToFileData(const llvm::vfs::Status &Status, FileData &Data) { Data.Name = Status.getName(); Data.Size = Status.getSize(); @@ -44,8 +44,9 @@ static void copyStatusToFileData(const vfs::Status &Status, /// implementation can optionally fill in FileDescriptor with a valid /// descriptor and the client guarantees that it will close it. bool FileSystemStatCache::get(StringRef Path, FileData &Data, bool isFile, - std::unique_ptr<vfs::File> *F, - FileSystemStatCache *Cache, vfs::FileSystem &FS) { + std::unique_ptr<llvm::vfs::File> *F, + FileSystemStatCache *Cache, + llvm::vfs::FileSystem &FS) { LookupResult R; bool isForDir = !isFile; @@ -55,7 +56,7 @@ bool FileSystemStatCache::get(StringRef Path, FileData &Data, bool isFile, else if (isForDir || !F) { // If this is a directory or a file descriptor is not needed and we have // no cache, just go to the file system. - llvm::ErrorOr<vfs::Status> Status = FS.status(Path); + llvm::ErrorOr<llvm::vfs::Status> Status = FS.status(Path); if (!Status) { R = CacheMissing; } else { @@ -79,7 +80,7 @@ bool FileSystemStatCache::get(StringRef Path, FileData &Data, bool isFile, // Otherwise, the open succeeded. Do an fstat to get the information // about the file. We'll end up returning the open file descriptor to the // client to do what they please with it. - llvm::ErrorOr<vfs::Status> Status = (*OwnedFile)->status(); + llvm::ErrorOr<llvm::vfs::Status> Status = (*OwnedFile)->status(); if (Status) { R = CacheExists; copyStatusToFileData(*Status, Data); @@ -111,7 +112,8 @@ bool FileSystemStatCache::get(StringRef Path, FileData &Data, bool isFile, MemorizeStatCalls::LookupResult MemorizeStatCalls::getStat(StringRef Path, FileData &Data, bool isFile, - std::unique_ptr<vfs::File> *F, vfs::FileSystem &FS) { + std::unique_ptr<llvm::vfs::File> *F, + llvm::vfs::FileSystem &FS) { LookupResult Result = statChained(Path, Data, isFile, F, FS); // Do not cache failed stats, it is easy to construct common inconsistent |