aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-08-08 00:37:50 +0000
committerChris Lattner <sabre@nondot.org>2006-08-08 00:37:50 +0000
commit8de353df9da7e5931688075c85d01e3153c73185 (patch)
tree98307c8162f30fc8f83433c507a9c3794079e533
parentf4b4c416d361e0f4523200a60d5fc290da1e8319 (diff)
Add ctor that initializes from a range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29560 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/SmallVector.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h
index d5e9900e5a..a1d226be07 100644
--- a/include/llvm/ADT/SmallVector.h
+++ b/include/llvm/ADT/SmallVector.h
@@ -51,6 +51,12 @@ public:
SmallVector() : Begin((T*)InlineElts), End(Begin), Capacity(Begin+N) {
}
+ template<typename ItTy>
+ SmallVector(ItTy S, ItTy E)
+ : Begin((T*)InlineElts), End(Begin), Capacity(Begin+N) {
+ append(S, E);
+ }
+
SmallVector(const SmallVector &RHS) {
unsigned RHSSize = RHS.size();
Begin = (T*)InlineElts;