Skip to content

Commit 6417a02

Browse files
Rename access() to getBlobMap()
1 parent ea6a1b4 commit 6417a02

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

mlir/include/mlir/IR/DialectResourceBlobManager.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ class DialectResourceBlobManager {
9494
}
9595

9696
/// Provide access to all the registered blobs via a callable. During access
97-
/// the blobs are guaranteed to remain unchanged.
98-
void access(llvm::function_ref<void(const llvm::StringMap<BlobEntry> &)>
99-
accessor) const;
97+
/// the blob map is guaranteed to remain unchanged.
98+
void getBlobMap(llvm::function_ref<void(const llvm::StringMap<BlobEntry> &)>
99+
accessor) const;
100100

101101
private:
102102
/// A mutex to protect access to the blob map.

mlir/lib/IR/DialectResourceBlobManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ auto DialectResourceBlobManager::insert(StringRef name,
6464
} while (true);
6565
}
6666

67-
void DialectResourceBlobManager::access(
67+
void DialectResourceBlobManager::getBlobMap(
6868
llvm::function_ref<void(const llvm::StringMap<BlobEntry> &)> accessor)
6969
const {
7070
llvm::sys::SmartScopedReader<true> reader(blobMapLock);

mlir/unittests/IR/BlobManagerTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ TEST(DialectResourceBlobManagerTest, Lookup) {
4040
ASSERT_NE(dialectManager.getBlobManager().lookup("blob1"), nullptr);
4141
}
4242

43-
TEST(DialectResourceBlobManagerTest, Access) {
43+
TEST(DialectResourceBlobManagerTest, GetBlobMap) {
4444
MLIRContext context;
4545
context.loadDialect<test::TestDialect>();
4646

@@ -56,7 +56,7 @@ TEST(DialectResourceBlobManagerTest, Access) {
5656
resourceAttr.getRawHandle().getManagerInterface(&context);
5757

5858
bool blobsArePresent = false;
59-
dialectManager.getBlobManager().access(
59+
dialectManager.getBlobManager().getBlobMap(
6060
[&](const llvm::StringMap<DialectResourceBlobManager::BlobEntry>
6161
&blobMap) { blobsArePresent = blobMap.contains("blob1"); });
6262
ASSERT_TRUE(blobsArePresent);
@@ -65,7 +65,7 @@ TEST(DialectResourceBlobManagerTest, Access) {
6565
block->clear();
6666

6767
blobsArePresent = false;
68-
dialectManager.getBlobManager().access(
68+
dialectManager.getBlobManager().getBlobMap(
6969
[&](const llvm::StringMap<DialectResourceBlobManager::BlobEntry>
7070
&blobMap) { blobsArePresent = blobMap.contains("blob1"); });
7171
ASSERT_TRUE(blobsArePresent);

0 commit comments

Comments
 (0)