Changes in directory llvm/include/llvm/ADT:

SmallPtrSet.h updated: 1.8 -> 1.9
---
Log message:

add iterator range version of ctor.


---
Diffs of the changes:  (+7 -0)

 SmallPtrSet.h |    7 +++++++
 1 files changed, 7 insertions(+)


Index: llvm/include/llvm/ADT/SmallPtrSet.h
diff -u llvm/include/llvm/ADT/SmallPtrSet.h:1.8 
llvm/include/llvm/ADT/SmallPtrSet.h:1.9
--- llvm/include/llvm/ADT/SmallPtrSet.h:1.8     Fri Mar  2 12:16:29 2007
+++ llvm/include/llvm/ADT/SmallPtrSet.h Sat Mar  3 22:04:43 2007
@@ -209,6 +209,13 @@
 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 {



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to