forked from OSchip/llvm-project
parent
1bd88bdab3
commit
7c773e6850
|
@ -90,6 +90,12 @@ public:
|
||||||
/// was already in the set.
|
/// was already in the set.
|
||||||
bool insert(void *Ptr);
|
bool insert(void *Ptr);
|
||||||
|
|
||||||
|
template <typename IterT>
|
||||||
|
void insert(IterT I, IterT E) {
|
||||||
|
for (; I != E; ++I)
|
||||||
|
insert((void*)*I);
|
||||||
|
}
|
||||||
|
|
||||||
/// erase - If the set contains the specified pointer, remove it and return
|
/// erase - If the set contains the specified pointer, remove it and return
|
||||||
/// true, otherwise return false.
|
/// true, otherwise return false.
|
||||||
bool erase(void *Ptr);
|
bool erase(void *Ptr);
|
||||||
|
@ -212,8 +218,7 @@ public:
|
||||||
template<typename It>
|
template<typename It>
|
||||||
SmallPtrSet(It I, It E)
|
SmallPtrSet(It I, It E)
|
||||||
: SmallPtrSetImpl(NextPowerOfTwo<SmallSizePowTwo>::Val) {
|
: SmallPtrSetImpl(NextPowerOfTwo<SmallSizePowTwo>::Val) {
|
||||||
for (; I != E; ++I)
|
insert(I, E);
|
||||||
insert(*I);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef SmallPtrSetIterator<PtrType> iterator;
|
typedef SmallPtrSetIterator<PtrType> iterator;
|
||||||
|
|
Loading…
Reference in New Issue