[cfe-commits] r137539 - /cfe/trunk/lib/Driver/ArgList.cpp
Chad Rosier
mcrosier at apple.com
Fri Aug 12 16:38:19 PDT 2011
Author: mcrosier
Date: Fri Aug 12 18:38:19 2011
New Revision: 137539
URL: http://llvm.org/viewvc/llvm-project?rev=137539&view=rev
Log:
[driver] Make sure to update the iterator end when erasing for Args.
Modified:
cfe/trunk/lib/Driver/ArgList.cpp
Modified: cfe/trunk/lib/Driver/ArgList.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ArgList.cpp?rev=137539&r1=137538&r2=137539&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ArgList.cpp (original)
+++ cfe/trunk/lib/Driver/ArgList.cpp Fri Aug 12 18:38:19 2011
@@ -50,9 +50,9 @@
for (iterator it = begin(), ie = end(); it != ie; ) {
if ((*it)->getOption().matches(Id)) {
it = Args.erase(it);
- } else {
+ ie = end();
+ } else
++it;
- }
}
}
More information about the cfe-commits
mailing list