generalize SmallVector copy ctor, there is no requirement for

the initialization vector to have the same fixed size, just the
same element type.

llvm-svn: 50334
This commit is contained in:
Chris Lattner 2008-04-28 06:01:06 +00:00
parent 8be72700b8
commit 84836144d9
1 changed files with 2 additions and 1 deletions

View File

@ -486,7 +486,8 @@ public:
append(S, E);
}
SmallVector(const SmallVector &RHS) : SmallVectorImpl<T>(NumTsAvailable) {
SmallVector(const SmallVectorImpl<T> &RHS)
: SmallVectorImpl<T>(NumTsAvailable) {
if (!RHS.empty())
operator=(RHS);
}