[FileSystem] Remove GetByteSize() from FileSpec

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

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

llvm-svn: 345812
This commit is contained in:
Jonas Devlieghere
2018-11-01 04:45:28 +00:00
parent 56a5a0c3ce
commit 59b78bcba2
13 changed files with 33 additions and 28 deletions

View File

@@ -83,12 +83,12 @@ 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_EQ(module_size, uuid_view.GetByteSize());
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_EQ(module_size, sysroot_view.GetByteSize());
EXPECT_EQ(module_size, FileSystem::Instance().GetByteSize(sysroot_view));
}
void ModuleCacheTest::TryGetAndPut(const FileSpec &cache_dir,