Add the ability to initialize a StringSet from a pair of iterators (NFC)
authorMehdi Amini <mehdi.amini@apple.com>
Wed, 10 Feb 2016 23:24:21 +0000 (23:24 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Wed, 10 Feb 2016 23:24:21 +0000 (23:24 +0000)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 260461

llvm/include/llvm/ADT/StringSet.h

index 08626dc..c32c2a4 100644 (file)
@@ -33,6 +33,12 @@ namespace llvm {
       assert(!Key.empty());
       return base::insert(std::make_pair(Key, '\0'));
     }
+
+    template <typename InputIt>
+    void insert(const InputIt &Begin, const InputIt &End) {
+      for (auto It = Begin; It != End; ++It)
+        base::insert(std::make_pair(*It, '\0'));
+    }
   };
 }