Don't increment a dead iterator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17904 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-11-16 19:04:40 +00:00
parent 429a9cbc2e
commit a63acbfeab

View File

@ -691,8 +691,7 @@ static bool LinkFunctionBody(Function *Dest, Function *Src,
*OI = RemapOperand(*OI, GlobalMap); *OI = RemapOperand(*OI, GlobalMap);
// There is no need to map the arguments anymore. // There is no need to map the arguments anymore.
for (Function::aiterator I = Src->abegin(), E = Src->aend(); for (Function::aiterator I = Src->abegin(), E = Src->aend(); I != E; ++I)
I != E; ++I, ++DI)
GlobalMap.erase(I); GlobalMap.erase(I);
return false; return false;