projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25259a3
)
Add a clear method to SmallVector
author
Chris Lattner
<sabre@nondot.org>
Mon, 7 Aug 2006 05:45:34 +0000
(
05:45
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 7 Aug 2006 05:45:34 +0000
(
05:45
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29542
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/SmallVector.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/SmallVector.h
b/include/llvm/ADT/SmallVector.h
index 9b760949e9566068a80b2382b18c2869b1861121..34c915039fe453ddaceb40cecf60ecaa19009daa 100644
(file)
--- 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<typename in_iter>