16
16
17
17
#include " llvm/ADT/SmallPtrSet.h"
18
18
#include " llvm/ADT/SmallVector.h"
19
- #include " llvm/ADT/STLExtras.h"
20
19
#include " llvm/ADT/iterator.h"
21
- #include " llvm/Support/Compiler.h"
22
- #include " llvm/Support/type_traits.h"
23
20
#include < cstddef>
24
21
#include < functional>
25
22
#include < set>
26
- #include < type_traits>
27
23
#include < utility>
28
24
29
25
namespace llvm {
@@ -180,10 +176,9 @@ class SmallSet {
180
176
bool erase (const T &V) {
181
177
if (!isSmall ())
182
178
return Set.erase (V);
183
-
184
- auto It = llvm::find (Vector, V);
185
- if (It != Vector.end ()) {
186
- Vector.erase (It);
179
+ auto I = std::find (Vector.begin (), Vector.end (), V);
180
+ if (I != Vector.end ()) {
181
+ Vector.erase (I);
187
182
return true ;
188
183
}
189
184
return false ;
@@ -209,8 +204,8 @@ class SmallSet {
209
204
// / Check if the SmallSet contains the given element.
210
205
bool contains (const T &V) const {
211
206
if (isSmall ())
212
- return llvm::is_contained (Vector, V );
213
- return llvm::is_contained ( Set, V );
207
+ return std::find (Vector. begin (), Vector. end (), V) != Vector. end ( );
208
+ return Set. find (V) != Set. end ( );
214
209
}
215
210
216
211
private:
@@ -225,8 +220,8 @@ class SmallSet {
225
220
return {const_iterator (I), Inserted};
226
221
}
227
222
228
- if ( auto I = llvm ::find (Vector, V);
229
- I != Vector.end ()) // Don't reinsert if it already exists.
223
+ auto I = std ::find (Vector. begin (), Vector. end () , V);
224
+ if ( I != Vector.end ()) // Don't reinsert if it already exists.
230
225
return {const_iterator (I), false };
231
226
if (Vector.size () < N) {
232
227
Vector.push_back (std::forward<ArgType>(V));
0 commit comments