add a simple reserve method.

llvm-svn: 30011
This commit is contained in:
Chris Lattner 2006-09-01 06:08:16 +00:00
parent f765351978
commit 6bfccbb08b
1 changed files with 5 additions and 0 deletions

View File

@ -136,6 +136,11 @@ public:
}
}
void reserve(unsigned N) {
if (unsigned(Capacity-Begin) < N)
grow(N);
}
void swap(SmallVectorImpl &RHS);
/// append - Add the specified range to the end of the SmallVector.