[FileSystem] Remove Exists() from FileSpec

This patch removes the Exists method from FileSpec and updates its uses
with calls to the FileSystem.

Differential revision: https://reviews.llvm.org/D53845

llvm-svn: 345854
This commit is contained in:
Jonas Devlieghere
2018-11-01 17:09:25 +00:00
parent 2c22c800a0
commit dbd7fabaa0
52 changed files with 178 additions and 171 deletions

View File

@@ -82,12 +82,13 @@ void ModuleCacheTest::TearDownTestCase() {
static void VerifyDiskState(const FileSpec &cache_dir, const char *hostname) {
FileSpec uuid_view = GetUuidView(cache_dir);
EXPECT_TRUE(uuid_view.Exists()) << "uuid_view is: " << uuid_view.GetCString();
EXPECT_TRUE(FileSystem::Instance().Exists(uuid_view))
<< "uuid_view is: " << uuid_view.GetCString();
EXPECT_EQ(module_size, FileSystem::Instance().GetByteSize(uuid_view));
FileSpec sysroot_view = GetSysrootView(cache_dir, hostname);
EXPECT_TRUE(sysroot_view.Exists()) << "sysroot_view is: "
<< sysroot_view.GetCString();
EXPECT_TRUE(FileSystem::Instance().Exists(sysroot_view))
<< "sysroot_view is: " << sysroot_view.GetCString();
EXPECT_EQ(module_size, FileSystem::Instance().GetByteSize(sysroot_view));
}