[driver] Make sure to update the iterator end when erasing for Args.

llvm-svn: 137539
This commit is contained in:
Chad Rosier 2011-08-12 23:38:19 +00:00
parent d8874dc1d6
commit 58b662c3e3
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}
}