forked from OSchip/llvm-project
[driver] Make sure to update the iterator end when erasing for Args.
llvm-svn: 137539
This commit is contained in:
parent
d8874dc1d6
commit
58b662c3e3
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue