[llvm-branch-commits] [llvm] [ADT] Use range-based helper functions in SmallSet (PR #108585)
Jakub Kuderski via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Sep 17 07:08:19 PDT 2024
================
@@ -234,19 +225,12 @@ class SmallSet {
/// Check if the SmallSet contains the given element.
bool contains(const T &V) const {
if (isSmall())
- return vfind(V) != Vector.end();
- return Set.find(V) != Set.end();
+ return llvm::is_contained(Vector, V);
+ return llvm::is_contained(Set, V);
----------------
kuhar wrote:
I'd expect it to call `set::find`: https://github.com/llvm/llvm-project/blob/49a754a43d5592e08ef177db794126ddc676d6b5/llvm/include/llvm/ADT/STLExtras.h#L1890-L1891
https://github.com/llvm/llvm-project/pull/108585
More information about the llvm-branch-commits
mailing list