diff options
author | Chris Lattner <sabre@nondot.org> | 2006-03-04 07:53:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-03-04 07:53:16 +0000 |
commit | 7d5c1e1ed1a6e225b927a8f52adf2ba22582bd89 (patch) | |
tree | 1b40b733a5f1bdefbfb0acacd3bd7c7170c8131f | |
parent | f42f516984e03114d4c494849216ebe48cbc935a (diff) | |
download | external_llvm-7d5c1e1ed1a6e225b927a8f52adf2ba22582bd89.zip external_llvm-7d5c1e1ed1a6e225b927a8f52adf2ba22582bd89.tar.gz external_llvm-7d5c1e1ed1a6e225b927a8f52adf2ba22582bd89.tar.bz2 |
Don't use invalidated iterators!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26521 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index dfdb5f4..5d9fada 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(); |