From: Chris Lattner Date: Tue, 8 Aug 2006 01:54:17 +0000 (+0000) Subject: capacity is a pointer, not a value X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8e10f5b8113a5080fc916d1123377292ef2f6012;p=oota-llvm.git capacity is a pointer, not a value git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29564 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 0ade4847b43..3e952ac4475 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -148,7 +148,7 @@ public: void assign(unsigned NumElts, const T &Elt) { clear(); - if (NumElts > Capacity) + if (Begin+NumElts > Capacity) grow(NumElts); End = Begin+NumElts; for (; NumElts; --NumElts)