Don't use an iterator which is potentially invalidated.
authorDan Gohman <gohman@apple.com>
Mon, 31 Aug 2009 21:58:28 +0000 (21:58 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 31 Aug 2009 21:58:28 +0000 (21:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80632 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index 3b7e4387508a1128dcc796789e8df7c1282c82f4..85e8fbb0984f43fa9622acb609ace8682940706c 100644 (file)
@@ -3912,7 +3912,7 @@ const SCEV *ScalarEvolution::getSCEVAtScope(const SCEV *V, const Loop *L) {
 
   // Otherwise compute it.
   const SCEV *C = computeSCEVAtScope(V, L);
-  Pair.first->second = C;
+  ValuesAtScopes[V][L] = C;
   return C;
 }