forked from OSchip/llvm-project
parent
ac37f9a9be
commit
4e7713c04d
|
@ -46,8 +46,8 @@ public:
|
|||
DeclRootsTy& DRoots, LiveSymbolsTy& LSymbols,
|
||||
DeadSymbolsTy& DSymbols) = 0;
|
||||
|
||||
virtual Store AddDecl(Store store, BasicValueFactory& BasicVals,
|
||||
SymbolManager& SymMgr, const VarDecl* VD, Expr* Ex,
|
||||
virtual Store AddDecl(Store store, GRStateManager& StMgr,
|
||||
const VarDecl* VD, Expr* Ex,
|
||||
RVal InitVal = UndefinedVal(), unsigned Count = 0) = 0;
|
||||
|
||||
virtual void print(Store store, std::ostream& Out,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue