From 0bfaa589f0ed91e3ac71868168d07344c5209ada 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 --- llvm/include/llvm/ADT/StringSet.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/llvm/include/llvm/ADT/StringSet.h b/llvm/include/llvm/ADT/StringSet.h index 08626dc..c32c2a49 100644 --- a/llvm/include/llvm/ADT/StringSet.h +++ b/llvm/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')); + } }; } -- 2.7.4