From c106fe9b9e17ce7cf338fa9827b786fce0b59124 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Wed, 10 Feb 2016 23:24:21 +0000 Subject: [PATCH] Add the ability to initialize a StringSet from a pair of iterators (NFC) From: Mehdi Amini llvm-svn: 260461 --- include/llvm/ADT/StringSet.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/llvm/ADT/StringSet.h b/include/llvm/ADT/StringSet.h index 08626dc7af8..c32c2a49743 100644 --- a/include/llvm/ADT/StringSet.h +++ b/include/llvm/ADT/StringSet.h @@ -33,6 +33,12 @@ namespace llvm { assert(!Key.empty()); return base::insert(std::make_pair(Key, '\0')); } + + template + void insert(const InputIt &Begin, const InputIt &End) { + for (auto It = Begin; It != End; ++It) + base::insert(std::make_pair(*It, '\0')); + } }; }