Fix for PR3946, in which SmallVector could behave strangely in corner cases.
[oota-llvm.git] / include / llvm / ADT / DenseSet.h
index 953c67d53ebdf49b34c34f9f3f26217a7e86044d..ce7344bc1f99b3eab218817559d9f3300cf8a182 100644 (file)
@@ -90,6 +90,13 @@ public:
   std::pair<iterator, bool> insert(const ValueT &V) {
     return TheMap.insert(std::make_pair(V, 0));
   }
+  
+  // Range insertion of values.
+  template<typename InputIt>
+  void insert(InputIt I, InputIt E) {
+    for (; I != E; ++I)
+      insert(*I);
+  }
 };
 
 } // end namespace llvm