[all-commits] [llvm/llvm-project] 59a3b4: [ADT] Deprecate DenseMap::getOrInsertDefault (#107...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Tue Sep 3 08:20:06 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 59a3b4156836c3ea8589d7a39e7b4712fc8698ec
https://github.com/llvm/llvm-project/commit/59a3b4156836c3ea8589d7a39e7b4712fc8698ec
Author: Kazu Hirata <kazu at google.com>
Date: 2024-09-03 (Tue, 03 Sep 2024)
Changed paths:
M clang/lib/Sema/SemaHLSL.cpp
M flang/lib/Optimizer/Transforms/AddAliasTags.cpp
M llvm/include/llvm/ADT/DenseMap.h
M mlir/lib/Transforms/SROA.cpp
Log Message:
-----------
[ADT] Deprecate DenseMap::getOrInsertDefault (#107040)
This patch deprecates DenseMap::getOrInsertDefault in favor of
DenseMap::operator[], which does the same thing, has been around
longer, and is also a household name as part of std::map and
std::unordered_map.
Note that DenseMap provides several equivalent ways to insert or
default-construct a key-value pair:
- operator[Key]
- try_emplace(Key).first->second
- getOrInsertDefault(Key)
- FindAndConstruct(Key).second
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list