Skip to content

Commit 4317817

Browse files
committed
[llvm][cas] Fix typo in needsGarbageCollection NFC
1 parent fddb3ec commit 4317817

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

llvm/include/llvm/CAS/UnifiedOnDiskCache.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class OnDiskKeyValueDB;
2121
/// High-level properties:
2222
/// * While \p UnifiedOnDiskCache is open on a directory, by any process, the
2323
/// storage size in that directory will keep growing unrestricted. For data to
24-
/// become eligible for garbase-collection there should be no open instances
24+
/// become eligible for garbage-collection there should be no open instances
2525
/// of \p UnifiedOnDiskCache for that directory, by any process.
2626
/// * Garbage-collection needs to be triggered explicitly by the client. It can
2727
/// be triggered on a directory concurrently, at any time and by any process,
@@ -84,7 +84,7 @@ class UnifiedOnDiskCache {
8484

8585
/// This is called implicitly at destruction time, so it is not required for a
8686
/// client to call this. After calling \p close the only method that is valid
87-
/// to call is \p needsGarbaseCollection.
87+
/// to call is \p needsGarbageCollection.
8888
///
8989
/// \param CheckSizeLimit if true it will check whether the primary store has
9090
/// exceeded its intended size limit. If false the check is skipped even if a
@@ -106,7 +106,7 @@ class UnifiedOnDiskCache {
106106

107107
/// \returns whether there are unused data that can be deleted using a
108108
/// \p collectGarbage call.
109-
bool needsGarbaseCollection() const { return NeedsGarbageCollection; }
109+
bool needsGarbageCollection() const { return NeedsGarbageCollection; }
110110

111111
/// Remove any unused data from the directory at \p Path. If there are no such
112112
/// data the operation is a no-op.

llvm/unittests/CAS/UnifiedOnDiskCacheTest.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ TEST(UnifiedOnDiskCacheTest, Basic) {
144144
reopenDB();
145145

146146
EXPECT_FALSE(UniDB->hasExceededSizeLimit());
147-
EXPECT_FALSE(UniDB->needsGarbaseCollection());
147+
EXPECT_FALSE(UniDB->needsGarbageCollection());
148148

149149
checkRootTree();
150150
checkKey(Key1Hash, "root");
@@ -154,10 +154,10 @@ TEST(UnifiedOnDiskCacheTest, Basic) {
154154
}
155155
PrevStoreSize = UniDB->getStorageSize();
156156
ASSERT_THAT_ERROR(UniDB->close(), Succeeded());
157-
EXPECT_TRUE(UniDB->needsGarbaseCollection());
157+
EXPECT_TRUE(UniDB->needsGarbageCollection());
158158

159159
reopenDB();
160-
EXPECT_TRUE(UniDB->needsGarbaseCollection());
160+
EXPECT_TRUE(UniDB->needsGarbageCollection());
161161

162162
std::optional<size_t> DirSizeBefore;
163163
ASSERT_THAT_ERROR(countFileSizes(Temp.path()).moveInto(DirSizeBefore),
@@ -172,7 +172,7 @@ TEST(UnifiedOnDiskCacheTest, Basic) {
172172
EXPECT_LT(*DirSizeAfter, *DirSizeBefore);
173173

174174
reopenDB();
175-
EXPECT_FALSE(UniDB->needsGarbaseCollection());
175+
EXPECT_FALSE(UniDB->needsGarbageCollection());
176176

177177
checkRootTree();
178178
checkKey(Key1Hash, "root");

0 commit comments

Comments
 (0)