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:
33591af
)
Fix this code to avoid decrementing an iterator past the beginning
author
Dan Gohman
<gohman@apple.com>
Wed, 28 Jul 2010 17:15:36 +0000
(17:15 +0000)
committer
Dan Gohman
<gohman@apple.com>
Wed, 28 Jul 2010 17:15:36 +0000
(17:15 +0000)
of a std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109597
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/PIC16/PIC16.h
patch
|
blob
|
history
diff --git
a/lib/Target/PIC16/PIC16.h
b/lib/Target/PIC16/PIC16.h
index cee55f4f260fe3c67324cac7d58fa208be76e5fa..08bb3e6f055b62092e11001da755bbcc44876a01 100644
(file)
--- a/
lib/Target/PIC16/PIC16.h
+++ b/
lib/Target/PIC16/PIC16.h
@@
-58,13
+58,10
@@
namespace PIC16CC {
ESNames() {}
public:
~ESNames() {
- std::vector<char*>::iterator it = stk.end();
- it--;
- while(stk.end() != stk.begin())
+ while (!stk.empty())
{
- char* p =
*it
;
+ char* p =
stk.back()
;
delete [] p;
- it--;
stk.pop_back();
}
}