[cfe-commits] r95362 - in /cfe/trunk: include/clang/Checker/PathSensitive/Store.h lib/Checker/BasicStore.cpp lib/Checker/FlatStore.cpp lib/Checker/GRState.cpp lib/Checker/RegionStore.cpp

Zhongxing Xu xuzhongxing at gmail.com
Thu Feb 4 21:18:51 PST 2010


Author: zhongxingxu
Date: Thu Feb  4 23:18:47 2010
New Revision: 95362

URL: http://llvm.org/viewvc/llvm-project?rev=95362&view=rev
Log:
More GRState* -> Store changes.

Modified:
    cfe/trunk/include/clang/Checker/PathSensitive/Store.h
    cfe/trunk/lib/Checker/BasicStore.cpp
    cfe/trunk/lib/Checker/FlatStore.cpp
    cfe/trunk/lib/Checker/GRState.cpp
    cfe/trunk/lib/Checker/RegionStore.cpp

Modified: cfe/trunk/include/clang/Checker/PathSensitive/Store.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Checker/PathSensitive/Store.h?rev=95362&r1=95361&r2=95362&view=diff

==============================================================================
--- cfe/trunk/include/clang/Checker/PathSensitive/Store.h (original)
+++ cfe/trunk/include/clang/Checker/PathSensitive/Store.h Thu Feb  4 23:18:47 2010
@@ -86,7 +86,7 @@
   /// 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;
 

Modified: cfe/trunk/lib/Checker/BasicStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/BasicStore.cpp?rev=95362&r1=95361&r2=95362&view=diff

==============================================================================
--- cfe/trunk/lib/Checker/BasicStore.cpp (original)
+++ cfe/trunk/lib/Checker/BasicStore.cpp Thu Feb  4 23:18:47 2010
@@ -40,7 +40,7 @@
 
   ~BasicStoreManager() {}
 
-  SubRegionMap *getSubRegionMap(const GRState *state) {
+  SubRegionMap *getSubRegionMap(Store store) {
     return new BasicStoreSubRegionMap();
   }
 

Modified: cfe/trunk/lib/Checker/FlatStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/FlatStore.cpp?rev=95362&r1=95361&r2=95362&view=diff

==============================================================================
--- cfe/trunk/lib/Checker/FlatStore.cpp (original)
+++ cfe/trunk/lib/Checker/FlatStore.cpp Thu Feb  4 23:18:47 2010
@@ -37,7 +37,9 @@
     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 @@
   return store;
 }
 
-
-SubRegionMap *FlatStoreManager::getSubRegionMap(const GRState *state) {
-  return 0;
-}
-
 SVal FlatStoreManager::getLValueVar(const VarDecl *VD, 
                                     const LocationContext *LC) {
   return UnknownVal();

Modified: cfe/trunk/lib/Checker/GRState.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRState.cpp?rev=95362&r1=95361&r2=95362&view=diff

==============================================================================
--- cfe/trunk/lib/Checker/GRState.cpp (original)
+++ cfe/trunk/lib/Checker/GRState.cpp Thu Feb  4 23:18:47 2010
@@ -301,7 +301,8 @@
 
   // 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);
 }

Modified: cfe/trunk/lib/Checker/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/RegionStore.cpp?rev=95362&r1=95361&r2=95362&view=diff

==============================================================================
--- cfe/trunk/lib/Checker/RegionStore.cpp (original)
+++ cfe/trunk/lib/Checker/RegionStore.cpp Thu Feb  4 23:18:47 2010
@@ -215,7 +215,9 @@
       delete (*I).second;
   }
 
-  SubRegionMap *getSubRegionMap(const GRState *state);
+  SubRegionMap *getSubRegionMap(Store store) {
+    return getRegionStoreSubRegionMap(store);
+  }
 
   RegionStoreSubRegionMap *getRegionStoreSubRegionMap(Store store);
 
@@ -474,15 +476,10 @@
   return M;
 }
 
-SubRegionMap *RegionStoreManager::getSubRegionMap(const GRState *state) {
-  return getRegionStoreSubRegionMap(state->getStore());
-}
-
 //===----------------------------------------------------------------------===//
 // Binding invalidation.
 //===----------------------------------------------------------------------===//
 
-
 void RegionStoreManager::RemoveSubRegionBindings(RegionBindings &B,
                                                  const MemRegion *R,
                                                  RegionStoreSubRegionMap &M) {





More information about the cfe-commits mailing list