summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-06-28 20:27:24 +0000
committerDan Gohman <gohman@apple.com>2007-06-28 20:27:24 +0000
commit8b42bcdd1ad6f3f908d062b189fbc2a6449fae83 (patch)
tree491c524148b4c11e39c643a931376d9ec335a4a7
parent00d8a84b4432bedc3050f012454cbf6ef1b05461 (diff)
downloadllvm-8b42bcdd1ad6f3f908d062b189fbc2a6449fae83.tar.gz
llvm-8b42bcdd1ad6f3f908d062b189fbc2a6449fae83.tar.bz2
llvm-8b42bcdd1ad6f3f908d062b189fbc2a6449fae83.tar.xz
Add a default parameter to a SmallVector constructor to allow it to
be called with just an initial length value, just like in std::vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37779 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/SmallVector.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h
index 5fcb2b9306..bb8cef4ce8 100644
--- a/include/llvm/ADT/SmallVector.h
+++ b/include/llvm/ADT/SmallVector.h
@@ -442,7 +442,7 @@ public:
SmallVector() : SmallVectorImpl<T>(NumTsAvailable) {
}
- SmallVector(unsigned Size, const T &Value)
+ SmallVector(unsigned Size, const T &Value = T())
: SmallVectorImpl<T>(NumTsAvailable) {
this->reserve(Size);
while (Size--)