]> granicus.if.org Git - clang/commitdiff
More GRState* -> Store changes.
authorZhongxing Xu <xuzhongxing@gmail.com>
Fri, 5 Feb 2010 05:18:47 +0000 (05:18 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Fri, 5 Feb 2010 05:18:47 +0000 (05:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95362 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Checker/PathSensitive/Store.h
lib/Checker/BasicStore.cpp
lib/Checker/FlatStore.cpp
lib/Checker/GRState.cpp
lib/Checker/RegionStore.cpp

index b00e9b22378beb1843b3d290a1f457af92c07728..feba9de97eda979428a3a3a32c7476d236756c24 100644 (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;
 
index 5d8be82f3f52c972dfe80a390c00fdea3af9bc35..2c83ed9687159e2506e835fa4e2b34cc61552fb3 100644 (file)
@@ -40,7 +40,7 @@ public:
 
   ~BasicStoreManager() {}
 
-  SubRegionMap *getSubRegionMap(const GRState *state) {
+  SubRegionMap *getSubRegionMap(Store store) {
     return new BasicStoreSubRegionMap();
   }
 
index e9246642ed49e7945b3356e43cd6cdcf990c3412..c4f37dff658233f53b8043305dceb3fdd0da17de 100644 (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();
index 2e952068fb0be264a516b8598f2a63adbdb2e569..3abc6d29011371200398acdac8947d86bc759f33 100644 (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);
 }
index c59ecf8eb200cd659f8d7caeec4ba66751b4139a..420f6650b80a1108d5a23c17e256bffc19cd6174 100644 (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) {