diff options
author | Chad Rosier <mcrosier@apple.com> | 2011-08-12 23:38:19 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2011-08-12 23:38:19 +0000 |
commit | b18d503bc939281d8ea0dacea44e847297b92e8d (patch) | |
tree | ac801cd03126f2f60979fce3831cd9e0a40426d0 /lib/Driver/ArgList.cpp | |
parent | 9c378f705405d37f49795d5e915989de774fe11f (diff) |
[driver] Make sure to update the iterator end when erasing for Args.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ArgList.cpp')
-rw-r--r-- | lib/Driver/ArgList.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Driver/ArgList.cpp b/lib/Driver/ArgList.cpp index 0d7b057c78..c76356ca20 100644 --- a/lib/Driver/ArgList.cpp +++ b/lib/Driver/ArgList.cpp @@ -50,9 +50,9 @@ void ArgList::eraseArg(OptSpecifier Id) { for (iterator it = begin(), ie = end(); it != ie; ) { if ((*it)->getOption().matches(Id)) { it = Args.erase(it); - } else { + ie = end(); + } else ++it; - } } } |