Don't use an iterator which is potentially invalidated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80632 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 3b7e438..85e8fbb 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -3912,7 +3912,7 @@
 
   // Otherwise compute it.
   const SCEV *C = computeSCEVAtScope(V, L);
-  Pair.first->second = C;
+  ValuesAtScopes[V][L] = C;
   return C;
 }