[llvm] df017dc - [ADT] Use llvm::is_contained (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 22:24:28 PST 2024
Author: Kazu Hirata
Date: 2024-01-19T22:24:14-08:00
New Revision: df017dc66269ed758a741a6519d4a0efe3161780
URL: https://github.com/llvm/llvm-project/commit/df017dc66269ed758a741a6519d4a0efe3161780
DIFF: https://github.com/llvm/llvm-project/commit/df017dc66269ed758a741a6519d4a0efe3161780.diff
LOG: [ADT] Use llvm::is_contained (NFC)
Added:
Modified:
llvm/include/llvm/ADT/SetVector.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/SetVector.h b/llvm/include/llvm/ADT/SetVector.h
index ff083556cf1694..69931e02953d8a 100644
--- a/llvm/include/llvm/ADT/SetVector.h
+++ b/llvm/include/llvm/ADT/SetVector.h
@@ -162,7 +162,7 @@ class SetVector {
bool insert(const value_type &X) {
if constexpr (canBeSmall())
if (isSmall()) {
- if (llvm::find(vector_, X) == vector_.end()) {
+ if (!llvm::is_contained(vector_, X)) {
vector_.push_back(X);
if (vector_.size() > N)
makeBig();
More information about the llvm-commits
mailing list