diff options
| -rw-r--r-- | llvm/include/llvm/ADT/SmallVector.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h index d972ea6e844..e3aec7fec05 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. |

