Don't use invalidated iterators!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26521 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-03-04 07:53:16 +00:00
parent f42f516984
commit 7d5c1e1ed1

View File

@ -107,9 +107,9 @@ static struct PerModuleInfo {
}
// Look for intrinsic functions and CallInst that need to be upgraded
for (Module::iterator FI = CurrentModule->begin(),FE = CurrentModule->end();
FI != FE; ++FI)
UpgradeCallsToIntrinsic(FI);
for (Module::iterator FI = CurrentModule->begin(),
FE = CurrentModule->end(); FI != FE; )
UpgradeCallsToIntrinsic(FI++);
Values.clear(); // Clear out function local definitions
Types.clear();