Skip to content

Commit

Permalink
Add the ability to initialize a StringSet from a pair of iterators (NFC)
Browse files Browse the repository at this point in the history
From: Mehdi Amini <[email protected]>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260461 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
joker-eph committed Feb 10, 2016
1 parent e124404 commit 0f2eb3b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/llvm/ADT/StringSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
};
}

Expand Down

0 comments on commit 0f2eb3b

Please sign in to comment.