diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 9b760949e95..34c915039fe 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -125,6 +125,13 @@ public: End->~T(); } + void clear() { + while (End != Begin) { + End->~T(); + --End; + } + } + /// append - Add the specified range to the end of the SmallVector. /// template