diff options
author | Harlan Haskins <harlan@harlanhaskins.com> | 2019-04-16 18:00:43 +0000 |
---|---|---|
committer | Harlan Haskins <harlan@harlanhaskins.com> | 2019-04-16 18:00:43 +0000 |
commit | d8f776af6ed999fa621062b6c8b92d1e45e57516 (patch) | |
tree | dfff3d0709d2f677893bbfadc718d46920a9b605 | |
parent | 57213d839ac79a2ea6907027fb7082fb7892d5cb (diff) | |
download | bcm5719-llvm-d8f776af6ed999fa621062b6c8b92d1e45e57516.tar.gz bcm5719-llvm-d8f776af6ed999fa621062b6c8b92d1e45e57516.zip |
[FileSystemStatCache] Update test for new FileSystemStatCache API
Summary: Update this test to return std::error_code instead of LookupResult.
Reviewers: arphaman
Subscribers: dexonsmith, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D60786
llvm-svn: 358511
-rw-r--r-- | clang/unittests/Basic/FileManagerTest.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/unittests/Basic/FileManagerTest.cpp b/clang/unittests/Basic/FileManagerTest.cpp index c9dfbd6b5c6..19e2180d3ff 100644 --- a/clang/unittests/Basic/FileManagerTest.cpp +++ b/clang/unittests/Basic/FileManagerTest.cpp @@ -57,9 +57,10 @@ public: } // Implement FileSystemStatCache::getStat(). - LookupResult getStat(StringRef Path, llvm::vfs::Status &Status, bool isFile, - std::unique_ptr<llvm::vfs::File> *F, - llvm::vfs::FileSystem &FS) override { + std::error_code getStat(StringRef Path, llvm::vfs::Status &Status, + bool isFile, + std::unique_ptr<llvm::vfs::File> *F, + llvm::vfs::FileSystem &FS) override { #ifndef _WIN32 SmallString<128> NormalizedPath(Path); llvm::sys::path::native(NormalizedPath); @@ -68,10 +69,10 @@ public: if (StatCalls.count(Path) != 0) { Status = StatCalls[Path]; - return CacheExists; + return std::error_code(); } - return CacheMissing; // This means the file/directory doesn't exist. + return std::make_error_code(std::errc::no_such_file_or_directory); } }; |