Don't use invalidated iterators!

llvm-svn: 26521
This commit is contained in:
Chris Lattner 2006-03-04 07:53:16 +00:00
parent c66fd44541
commit a33bcff313
1 changed files with 3 additions and 3 deletions

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();