Skip to content

Commit 7449453

Browse files
committed
fixup: correct typos
1 parent c02a1b8 commit 7449453

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

mlir/lib/IR/AttributeDetail.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ class DistinctAttributeUniquer {
395395
};
396396

397397
/// An allocator for distinct attribute storage instances. Uses a synchronized
398-
/// BumpPtrAllocator to ensure allocated storage is deleted when the
399-
/// DistinctAttributeAllocator is destroyed
398+
/// BumpPtrAllocator to ensure thread-safety. The allocated storage is deleted
399+
/// when the DistinctAttributeAllocator is destroyed.
400400
class DistinctAttributeAllocator final {
401401
public:
402402
DistinctAttributeAllocator() = default;
@@ -412,11 +412,11 @@ class DistinctAttributeAllocator final {
412412
};
413413

414414
private:
415-
/// Used to allocate Distict Attribute storage. When this allocator destroyed
416-
/// in till also dealllocate any storage instances
415+
/// Used to allocate Distict Attribute storages. The managed memory is freed
416+
/// automatically when the allocator instance is destroyed.
417417
llvm::BumpPtrAllocator allocator;
418418

419-
/// Used to lock access to the allocator
419+
/// Used to lock access to the allocator.
420420
std::mutex allocatorMutex;
421421
};
422422
} // namespace detail

mlir/unittests/IR/DistinctAttributeAllocatorTest.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
//===- DistinctAttributeAllocatorTest.cpp - DistinctAttr storage alloc test
2-
//-===//
1+
//=== DistinctAttributeAllocatorTest.cpp - DistinctAttr storage alloc test ===//
32
//
43
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
54
// See https://llvm.org/LICENSE.txt for license information.
65
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
76
//
8-
//===-----------------------------------------------------------------------===//
7+
//===----------------------------------------------------------------------===//
98

109
#include "gtest/gtest.h"
1110

@@ -19,7 +18,7 @@ using namespace mlir;
1918

2019
//
2120
// Test that a DistinctAttr that is created on a separate thread does
22-
// not have its storage deleted when the thread joins
21+
// not have its storage deleted when the thread joins.
2322
//
2423
TEST(DistinctAttributeAllocatorTest, TestAttributeWellFormedAfterThreadJoin) {
2524
MLIRContext ctx;

0 commit comments

Comments
 (0)