More GRState* -> Store changes.

llvm-svn: 95362
This commit is contained in:
Zhongxing Xu 2010-02-05 05:18:47 +00:00
parent 6ec89d4953
commit f668204a6a
5 changed files with 10 additions and 15 deletions

View File

@ -86,7 +86,7 @@ public:
/// getSubRegionMap - Returns an opaque map object that clients can query
/// to get the subregions of a given MemRegion object. It is the
// caller's responsibility to 'delete' the returned map.
virtual SubRegionMap *getSubRegionMap(const GRState *state) = 0;
virtual SubRegionMap *getSubRegionMap(Store store) = 0;
virtual SVal getLValueVar(const VarDecl *VD, const LocationContext *LC) = 0;

View File

@ -40,7 +40,7 @@ public:
~BasicStoreManager() {}
SubRegionMap *getSubRegionMap(const GRState *state) {
SubRegionMap *getSubRegionMap(Store store) {
return new BasicStoreSubRegionMap();
}

View File

@ -37,7 +37,9 @@ public:
return RBFactory.GetEmptyMap().getRoot();
}
SubRegionMap *getSubRegionMap(const GRState *state);
SubRegionMap *getSubRegionMap(Store store) {
return 0;
}
SVal getLValueVar(const VarDecl *VD, const LocationContext *LC);
@ -88,11 +90,6 @@ Store FlatStoreManager::BindCompoundLiteral(Store store,
return store;
}
SubRegionMap *FlatStoreManager::getSubRegionMap(const GRState *state) {
return 0;
}
SVal FlatStoreManager::getLValueVar(const VarDecl *VD,
const LocationContext *LC) {
return UnknownVal();

View File

@ -301,7 +301,8 @@ bool ScanReachableSymbols::scan(const MemRegion *R) {
// Now look at the subregions.
if (!SRM.get())
SRM.reset(state->getStateManager().getStoreManager().getSubRegionMap(state));
SRM.reset(state->getStateManager().getStoreManager().
getSubRegionMap(state->getStore()));
return SRM->iterSubRegions(R, *this);
}

View File

@ -215,7 +215,9 @@ public:
delete (*I).second;
}
SubRegionMap *getSubRegionMap(const GRState *state);
SubRegionMap *getSubRegionMap(Store store) {
return getRegionStoreSubRegionMap(store);
}
RegionStoreSubRegionMap *getRegionStoreSubRegionMap(Store store);
@ -474,15 +476,10 @@ RegionStoreManager::getRegionStoreSubRegionMap(Store store) {
return M;
}
SubRegionMap *RegionStoreManager::getSubRegionMap(const GRState *state) {
return getRegionStoreSubRegionMap(state->getStore());
}
//===----------------------------------------------------------------------===//
// Binding invalidation.
//===----------------------------------------------------------------------===//
void RegionStoreManager::RemoveSubRegionBindings(RegionBindings &B,
const MemRegion *R,
RegionStoreSubRegionMap &M) {