aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/BasicStore.cpp14
-rw-r--r--lib/Analysis/GRState.cpp5
2 files changed, 12 insertions, 7 deletions
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp
index ad0e12aa4c..2ed89c6f7d 100644
--- a/lib/Analysis/BasicStore.cpp
+++ b/lib/Analysis/BasicStore.cpp
@@ -41,8 +41,8 @@ public:
DeclRootsTy& DRoots, LiveSymbolsTy& LSymbols,
DeadSymbolsTy& DSymbols);
- virtual Store AddDecl(Store store, BasicValueFactory& BasicVals,
- SymbolManager& SymMgr, const VarDecl* VD, Expr* Ex,
+ virtual Store AddDecl(Store store, GRStateManager& StateMgr,
+ const VarDecl* VD, Expr* Ex,
RVal InitVal = UndefinedVal(), unsigned Count = 0);
static inline VarBindingsTy GetVarBindings(Store store) {
@@ -243,9 +243,13 @@ Store BasicStoreManager::getInitialStore(GRStateManager& StateMgr) {
return St;
}
-Store BasicStoreManager::AddDecl(Store store, BasicValueFactory& BasicVals,
- SymbolManager& SymMgr, const VarDecl* VD,
- Expr* Ex, RVal InitVal, unsigned Count) {
+Store BasicStoreManager::AddDecl(Store store, GRStateManager& StateMgr,
+ const VarDecl* VD, Expr* Ex,
+ RVal InitVal, unsigned Count) {
+
+ BasicValueFactory& BasicVals = StateMgr.getBasicVals();
+ SymbolManager& SymMgr = StateMgr.getSymbolManager();
+
// BasicStore does not model arrays and structs.
if (VD->getType()->isArrayType() || VD->getType()->isStructureType())
return store;
diff --git a/lib/Analysis/GRState.cpp b/lib/Analysis/GRState.cpp
index f9257274a6..f1e07907fd 100644
--- a/lib/Analysis/GRState.cpp
+++ b/lib/Analysis/GRState.cpp
@@ -148,13 +148,14 @@ const GRState* GRStateManager::AddDecl(const GRState* St, const VarDecl* VD,
Store NewStore;
if (Ex)
- NewStore = StMgr->AddDecl(OldStore, BasicVals, SymMgr, VD, Ex,
+ NewStore = StMgr->AddDecl(OldStore, *this, VD, Ex,
GetRVal(St, Ex), Count);
else
- NewStore = StMgr->AddDecl(OldStore, BasicVals, SymMgr, VD, Ex);
+ NewStore = StMgr->AddDecl(OldStore, *this, VD, Ex);
if (NewStore == OldStore)
return St;
+
GRState NewSt = *St;
NewSt.St = NewStore;
return getPersistentState(NewSt);