diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h index d972ea6e844f..e3aec7fec050 100644 --- a/llvm/include/llvm/ADT/SmallVector.h +++ b/llvm/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.