Changes in directory llvm/include/llvm/ADT:
SmallVector.h updated: 1.16 -> 1.17 --- Log message: Add 2nd form of resize --- Diffs of the changes: (+12 -0) SmallVector.h | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/include/llvm/ADT/SmallVector.h diff -u llvm/include/llvm/ADT/SmallVector.h:1.16 llvm/include/llvm/ADT/SmallVector.h:1.17 --- llvm/include/llvm/ADT/SmallVector.h:1.16 Tue Aug 22 12:28:57 2006 +++ llvm/include/llvm/ADT/SmallVector.h Mon Aug 28 16:52:08 2006 @@ -124,6 +124,18 @@ } } + void resize(unsigned N, const T &NV) { + if (N < size()) { + destroy_range(Begin+N, End); + End = Begin+N; + } else if (N > size()) { + if (Begin+N > Capacity) + grow(N); + construct_range(End, Begin+N, NV); + End = Begin+N; + } + } + void swap(SmallVectorImpl &RHS); /// append - Add the specified range to the end of the SmallVector. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits