projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f3d738
)
add iterator range version of ctor.
author
Chris Lattner
<sabre@nondot.org>
Sun, 4 Mar 2007 04:04:43 +0000
(
04:04
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 4 Mar 2007 04:04:43 +0000
(
04:04
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34899
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/SmallPtrSet.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/SmallPtrSet.h
b/include/llvm/ADT/SmallPtrSet.h
index f77eb7d8ca71009b8d68e7e6b955c282726ceae9..a85b4974f89b4338caea0b101a0cbacea8f61425 100644
(file)
--- a/
include/llvm/ADT/SmallPtrSet.h
+++ b/
include/llvm/ADT/SmallPtrSet.h
@@
-209,6
+209,13
@@
class SmallPtrSet : public SmallPtrSetImpl {
public:
SmallPtrSet() : SmallPtrSetImpl(NextPowerOfTwo<SmallSizePowTwo>::Val) {}
+ template<typename It>
+ SmallPtrSet(It I, It E)
+ : SmallPtrSetImpl(NextPowerOfTwo<SmallSizePowTwo>::Val) {
+ for (; I != E; ++I)
+ insert(*I);
+ }
+
typedef SmallPtrSetIterator<PtrType> iterator;
typedef SmallPtrSetIterator<PtrType> const_iterator;
inline iterator begin() const {