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:
2ce7f20
)
add a new pop_back_val method which returns the value popped. This is
author
Chris Lattner
<sabre@nondot.org>
Fri, 5 Dec 2008 07:11:05 +0000
(07:11 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 5 Dec 2008 07:11:05 +0000
(07:11 +0000)
heretical from a STL standpoint, but is oh-so-useful for things that
can't throw exceptions when copied, like, well, everything in LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60587
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 9ece43f128217a5a4cc8ac91af68871810ed51eb..94e7276150dfe47d4b6dbfcd26b6fb8b4aba2eaf 100644
(file)
--- a/
include/llvm/ADT/SmallVector.h
+++ b/
include/llvm/ADT/SmallVector.h
@@
-162,6
+162,12
@@
public:
End->~T();
}
+ T pop_back_val() {
+ T Result = back();
+ pop_back();
+ return Result;
+ }
+
void clear() {
destroy_range(Begin, End);
End = Begin;