diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/SmallVector.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index d972ea6e84..e3aec7fec0 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -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. |