From 43178170a75cb6609fe021e68534fa6f6cb2dc0c Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Tue, 1 Apr 2025 09:49:36 -0700 Subject: [PATCH] [llvm][cas] Fix typo in needsGarbageCollection NFC --- llvm/include/llvm/CAS/UnifiedOnDiskCache.h | 6 +++--- llvm/unittests/CAS/UnifiedOnDiskCacheTest.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/llvm/include/llvm/CAS/UnifiedOnDiskCache.h b/llvm/include/llvm/CAS/UnifiedOnDiskCache.h index be1880d6b3023..c3ca8d9c4caf3 100644 --- a/llvm/include/llvm/CAS/UnifiedOnDiskCache.h +++ b/llvm/include/llvm/CAS/UnifiedOnDiskCache.h @@ -21,7 +21,7 @@ class OnDiskKeyValueDB; /// High-level properties: /// * While \p UnifiedOnDiskCache is open on a directory, by any process, the /// storage size in that directory will keep growing unrestricted. For data to -/// become eligible for garbase-collection there should be no open instances +/// become eligible for garbage-collection there should be no open instances /// of \p UnifiedOnDiskCache for that directory, by any process. /// * Garbage-collection needs to be triggered explicitly by the client. It can /// be triggered on a directory concurrently, at any time and by any process, @@ -84,7 +84,7 @@ class UnifiedOnDiskCache { /// This is called implicitly at destruction time, so it is not required for a /// client to call this. After calling \p close the only method that is valid - /// to call is \p needsGarbaseCollection. + /// to call is \p needsGarbageCollection. /// /// \param CheckSizeLimit if true it will check whether the primary store has /// exceeded its intended size limit. If false the check is skipped even if a @@ -106,7 +106,7 @@ class UnifiedOnDiskCache { /// \returns whether there are unused data that can be deleted using a /// \p collectGarbage call. - bool needsGarbaseCollection() const { return NeedsGarbageCollection; } + bool needsGarbageCollection() const { return NeedsGarbageCollection; } /// Remove any unused data from the directory at \p Path. If there are no such /// data the operation is a no-op. diff --git a/llvm/unittests/CAS/UnifiedOnDiskCacheTest.cpp b/llvm/unittests/CAS/UnifiedOnDiskCacheTest.cpp index 7a57e97305e88..a5af073f5d812 100644 --- a/llvm/unittests/CAS/UnifiedOnDiskCacheTest.cpp +++ b/llvm/unittests/CAS/UnifiedOnDiskCacheTest.cpp @@ -144,7 +144,7 @@ TEST(UnifiedOnDiskCacheTest, Basic) { reopenDB(); EXPECT_FALSE(UniDB->hasExceededSizeLimit()); - EXPECT_FALSE(UniDB->needsGarbaseCollection()); + EXPECT_FALSE(UniDB->needsGarbageCollection()); checkRootTree(); checkKey(Key1Hash, "root"); @@ -154,10 +154,10 @@ TEST(UnifiedOnDiskCacheTest, Basic) { } PrevStoreSize = UniDB->getStorageSize(); ASSERT_THAT_ERROR(UniDB->close(), Succeeded()); - EXPECT_TRUE(UniDB->needsGarbaseCollection()); + EXPECT_TRUE(UniDB->needsGarbageCollection()); reopenDB(); - EXPECT_TRUE(UniDB->needsGarbaseCollection()); + EXPECT_TRUE(UniDB->needsGarbageCollection()); std::optional DirSizeBefore; ASSERT_THAT_ERROR(countFileSizes(Temp.path()).moveInto(DirSizeBefore), @@ -172,7 +172,7 @@ TEST(UnifiedOnDiskCacheTest, Basic) { EXPECT_LT(*DirSizeAfter, *DirSizeBefore); reopenDB(); - EXPECT_FALSE(UniDB->needsGarbaseCollection()); + EXPECT_FALSE(UniDB->needsGarbageCollection()); checkRootTree(); checkKey(Key1Hash, "root");