aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/ADT/SmallVector.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h
index 18e1aae4a1..7e0eab194d 100644
--- a/include/llvm/ADT/SmallVector.h
+++ b/include/llvm/ADT/SmallVector.h
@@ -486,6 +486,11 @@ public:
append(S, E);
}
+ SmallVector(const SmallVector &RHS) : SmallVectorImpl<T>(NumTsAvailable) {
+ if (!RHS.empty())
+ operator=(RHS);
+ }
+
SmallVector(const SmallVectorImpl<T> &RHS)
: SmallVectorImpl<T>(NumTsAvailable) {
if (!RHS.empty())