Skip to content

Commit a4819d6

Browse files
[mlir] Simplify code with StringMap::operator[] (NFC) (#115427)
1 parent 6ce4426 commit a4819d6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mlir/lib/IR/MLIRContext.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -986,8 +986,7 @@ void RegisteredOperationName::insert(
986986
}
987987
StringRef name = impl->getName().strref();
988988
// Insert the operation info if it doesn't exist yet.
989-
auto it = ctxImpl.operations.insert({name, nullptr});
990-
it.first->second = std::move(ownedImpl);
989+
ctxImpl.operations[name] = std::move(ownedImpl);
991990

992991
// Update the registered info for this operation.
993992
auto emplaced = ctxImpl.registeredOperations.try_emplace(

0 commit comments

Comments
 (0)