[llvm] ADT: Improve DenseMap documentation for insertion APIs (PR #172177)
Jakub Kuderski via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 15 06:03:02 PST 2025
================
@@ -295,14 +310,24 @@ class DenseMapBase : public DebugEpochBase {
insert(adl_begin(R), adl_end(R));
}
+ /// Inserts a new element or assigns to the existing one.
+ ///
+ /// If the key does not exist, a new element is inserted. If the key already
+ /// exists, the mapped value is replaced with the provided value.
+ ///
+ /// \param Key The key to insert or update.
+ /// \param Val The value to insert or assign.
+ /// \returns A pair consisting of an iterator to the element and a boolean
+ /// indicating whether insertion took place.
----------------
kuhar wrote:
similar here
https://github.com/llvm/llvm-project/pull/172177
More information about the llvm-commits
mailing list