Lazy bingding for region-store manager.
* Now Bind() methods take and return GRState* because binding could
  also alter GDM.
* No variables are initialized except those declared with initial
  values.
* failed C test cases are due to bugs in RemoveDeadBindings(),
which removes constraints that is still alive. This will be fixed in later
patch.
* default value of array and struct regions will be implemented in later patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61274 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/GRState.cpp b/lib/Analysis/GRState.cpp
index 221ab06..8e49ebb 100644
--- a/lib/Analysis/GRState.cpp
+++ b/lib/Analysis/GRState.cpp
@@ -59,51 +59,6 @@
                                            LSymbols, DSymbols);
 }
 
-const GRState* GRStateManager::BindLoc(const GRState* St, Loc LV, SVal V) {
-  
-  Store OldStore = St->getStore();
-  Store NewStore = StoreMgr->Bind(OldStore, LV, V);
-  
-  if (NewStore == OldStore)
-    return St;
-  
-  GRState NewSt = *St;
-  NewSt.St = NewStore;
-  return getPersistentState(NewSt);    
-}
-
-const GRState* GRStateManager::BindDecl(const GRState* St, const VarDecl* VD, 
-                                        SVal* InitVal, unsigned Count) {
-  Store OldStore = St->getStore();
-  Store NewStore = StoreMgr->BindDecl(OldStore, VD, InitVal, Count);
-
-  if (NewStore == OldStore)
-    return St;
-  
-  GRState NewSt = *St;
-  NewSt.St = NewStore;
-  return getPersistentState(NewSt);
-}
-
-/// BindCompoundLiteral - Return the store that has the bindings currently
-///  in 'store' plus the bindings for the CompoundLiteral.  'R' is the region
-///  for the compound literal and 'BegInit' and 'EndInit' represent an
-///  array of initializer values.
-const GRState*
-GRStateManager::BindCompoundLiteral(const GRState* state,
-                                    const CompoundLiteralExpr* CL, SVal ILV) {
-
-  Store oldStore = state->getStore();
-  Store newStore = StoreMgr->BindCompoundLiteral(oldStore, CL, ILV);
-  
-  if (newStore == oldStore)
-    return state;
-  
-  GRState newState = *state;
-  newState.St = newStore;
-  return getPersistentState(newState);
-}
-
 const GRState* GRStateManager::Unbind(const GRState* St, Loc LV) {
   Store OldStore = St->getStore();
   Store NewStore = StoreMgr->Remove(OldStore, LV);
@@ -140,6 +95,13 @@
   return I;
 }
 
+const GRState* GRStateManager::MakeStateWithStore(const GRState* St, 
+                                                  Store store) {
+  GRState NewSt = *St;
+  NewSt.St = store;
+  return getPersistentState(NewSt);
+}
+
 
 //===----------------------------------------------------------------------===//
 //  State pretty-printing.