From 7d5c1e1ed1a6e225b927a8f52adf2ba22582bd89 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 4 Mar 2006 07:53:16 +0000 Subject: [PATCH] Don't use invalidated iterators! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26521 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AsmParser/llvmAsmParser.y | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index dfdb5f4ac1e..5d9fada8dca 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -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(); -- 2.34.1