[clang] [LifetimeSafety] Introduce a liveness-based lifetime policy (PR #159991)
Jan Voung via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 30 18:50:49 PDT 2025
================
@@ -974,62 +976,46 @@ static llvm::ImmutableSet<T> join(llvm::ImmutableSet<T> A,
return A;
}
-/// Checks if set A is a subset of set B.
-template <typename T>
-static bool isSubsetOf(const llvm::ImmutableSet<T> &A,
- const llvm::ImmutableSet<T> &B) {
- // Empty set is a subset of all sets.
- if (A.isEmpty())
- return true;
-
- for (const T &Elem : A)
- if (!B.contains(Elem))
- return false;
- return true;
-}
-
/// Computes the key-wise union of two ImmutableMaps.
+/// \param SymmetricJoin If true, the join is symmetric, applying JoinValues to
----------------
jvoung wrote:
small point -- it was initially unclear when you would want to do the SymmetricJoin, but after reading more of the PR, it appears to be a performance win
Or, perhaps more relevant to the documentation is when it would be correct to use SymmetricJoin?
https://github.com/llvm/llvm-project/pull/159991
More information about the cfe-commits
mailing list