[llvm-commits] CVS: llvm/include/llvm/ADT/SmallVector.h
Chris Lattner
sabre at nondot.org
Wed Jan 31 12:08:51 PST 2007
Changes in directory llvm/include/llvm/ADT:
SmallVector.h updated: 1.22 -> 1.23
---
Log message:
add missing ctor
---
Diffs of the changes: (+7 -0)
SmallVector.h | 7 +++++++
1 files changed, 7 insertions(+)
Index: llvm/include/llvm/ADT/SmallVector.h
diff -u llvm/include/llvm/ADT/SmallVector.h:1.22 llvm/include/llvm/ADT/SmallVector.h:1.23
--- llvm/include/llvm/ADT/SmallVector.h:1.22 Sun Oct 29 23:07:51 2006
+++ llvm/include/llvm/ADT/SmallVector.h Wed Jan 31 14:08:34 2007
@@ -418,6 +418,13 @@
SmallVector() : SmallVectorImpl<T>(NumTsAvailable) {
}
+ SmallVector(unsigned Size, const T &Value)
+ : SmallVectorImpl<T>(NumTsAvailable) {
+ this->reserve(Size);
+ while (Size--)
+ push_back(Value);
+ }
+
template<typename ItTy>
SmallVector(ItTy S, ItTy E) : SmallVectorImpl<T>(NumTsAvailable) {
append(S, E);
More information about the llvm-commits
mailing list