[clang] [llvm] [ADT] Make canonicalization a compile-time parameter of ImmutableSet/Map (PR #209300)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 14 05:59:16 PDT 2026
================
@@ -34,15 +34,23 @@ template <typename Tag> struct ID {
}
};
-/// Computes the union of two ImmutableSets.
+/// The lifetime analyses do not benefit from canonicalizing their immutable
+/// collections, so they opt out of it via these aliases.
template <typename T>
-llvm::ImmutableSet<T> join(llvm::ImmutableSet<T> A, llvm::ImmutableSet<T> B,
- typename llvm::ImmutableSet<T>::Factory &F) {
----------------
usx95 wrote:
I think now we can restore the previous more-special template.
```cpp
template <typename T>
SetTy <T> join(SetTy<T> A, SetTy<T> B, typename SetTy<T>::Factory &F) {
```
Same for map join.
https://github.com/llvm/llvm-project/pull/209300
More information about the cfe-commits
mailing list