Move the AnalysisContext* from GRState to Environment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80293 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/Environment.cpp b/lib/Analysis/Environment.cpp
index 98cd7d8..0b8ee66 100644
--- a/lib/Analysis/Environment.cpp
+++ b/lib/Analysis/Environment.cpp
@@ -74,12 +74,12 @@
   
   if (V.isUnknown()) {    
     if (Invalidate)
-      return Environment(F.Remove(Env.ExprBindings, S));
+      return Environment(F.Remove(Env.ExprBindings, S), Env.ACtx);
     else
       return Env;
   }
 
-  return Environment(F.Add(Env.ExprBindings, S, V));
+  return Environment(F.Add(Env.ExprBindings, S, V), Env.ACtx);
 }
 
 namespace {
@@ -105,12 +105,12 @@
                                        const GRState *ST,
                               llvm::SmallVectorImpl<const MemRegion*> &DRoots) {
   
-  CFG &C = *ST->getAnalysisContext().getCFG();
+  CFG &C = *Env.getAnalysisContext().getCFG();
   
   // We construct a new Environment object entirely, as this is cheaper than
   // individually removing all the subexpression bindings (which will greatly
   // outnumber block-level expression bindings).
-  Environment NewEnv = getInitialEnvironment();
+  Environment NewEnv = getInitialEnvironment(&Env.getAnalysisContext());
   
   // Iterate over the block-expr bindings.
   for (Environment::iterator I = Env.begin(), E = Env.end();