diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-02-05 05:18:47 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-02-05 05:18:47 +0000 |
commit | f5416bdb75832e0a400cf3b19bd2116d2fed9ebe (patch) | |
tree | 05c77f66feede3558479907f879e9752f7af67ec | |
parent | dc81c880cad01f01888632d28345077336ca06a4 (diff) |
More GRState* -> Store changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95362 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Checker/PathSensitive/Store.h | 2 | ||||
-rw-r--r-- | lib/Checker/BasicStore.cpp | 2 | ||||
-rw-r--r-- | lib/Checker/FlatStore.cpp | 9 | ||||
-rw-r--r-- | lib/Checker/GRState.cpp | 3 | ||||
-rw-r--r-- | lib/Checker/RegionStore.cpp | 9 |
5 files changed, 10 insertions, 15 deletions
diff --git a/include/clang/Checker/PathSensitive/Store.h b/include/clang/Checker/PathSensitive/Store.h index b00e9b2237..feba9de97e 100644 --- a/include/clang/Checker/PathSensitive/Store.h +++ b/include/clang/Checker/PathSensitive/Store.h @@ -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; diff --git a/lib/Checker/BasicStore.cpp b/lib/Checker/BasicStore.cpp index 5d8be82f3f..2c83ed9687 100644 --- a/lib/Checker/BasicStore.cpp +++ b/lib/Checker/BasicStore.cpp @@ -40,7 +40,7 @@ public: ~BasicStoreManager() {} - SubRegionMap *getSubRegionMap(const GRState *state) { + SubRegionMap *getSubRegionMap(Store store) { return new BasicStoreSubRegionMap(); } diff --git a/lib/Checker/FlatStore.cpp b/lib/Checker/FlatStore.cpp index e9246642ed..c4f37dff65 100644 --- a/lib/Checker/FlatStore.cpp +++ b/lib/Checker/FlatStore.cpp @@ -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(); diff --git a/lib/Checker/GRState.cpp b/lib/Checker/GRState.cpp index 2e952068fb..3abc6d2901 100644 --- a/lib/Checker/GRState.cpp +++ b/lib/Checker/GRState.cpp @@ -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); } diff --git a/lib/Checker/RegionStore.cpp b/lib/Checker/RegionStore.cpp index c59ecf8eb2..420f6650b8 100644 --- a/lib/Checker/RegionStore.cpp +++ b/lib/Checker/RegionStore.cpp @@ -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) { |