public:
typedef llvm::SmallSet<SymbolRef, 20> LiveSymbolsTy;
typedef llvm::DenseSet<SymbolRef> DeadSymbolsTy;
-
+
+protected:
+ /// MRMgr - Manages region objects associated with this StoreManager.
+ MemRegionManager MRMgr;
+
+ StoreManager(llvm::BumpPtrAllocator& Alloc) : MRMgr(Alloc) {}
+
+public:
virtual ~StoreManager() {}
/// Retrieve - Retrieves the value bound to specified location. The optional
SVal V) = 0;
virtual Store getInitialStore() = 0;
- virtual MemRegionManager& getRegionManager() = 0;
+ MemRegionManager& getRegionManager() { return MRMgr; }
virtual SVal getLValueVar(const GRState* St, const VarDecl* VD) = 0;
class VISIBILITY_HIDDEN BasicStoreManager : public StoreManager {
VarBindingsTy::Factory VBFactory;
GRStateManager& StateMgr;
- MemRegionManager MRMgr;
const MemRegion* SelfRegion;
public:
BasicStoreManager(GRStateManager& mgr)
- : VBFactory(mgr.getAllocator()),
+ : StoreManager(mgr.getAllocator()),
+ VBFactory(mgr.getAllocator()),
StateMgr(mgr),
- MRMgr(StateMgr.getAllocator()),
SelfRegion(0) {}
~BasicStoreManager() {}
Store BindInternal(Store St, Loc LV, SVal V);
Store Remove(Store St, Loc LV);
Store getInitialStore();
- MemRegionManager& getRegionManager() { return MRMgr; }
// FIXME: Investigate what is using this. This method should be removed.
virtual Loc getLoc(const VarDecl* VD) {
//
// MemRegions represent chunks of memory with a size (their "extent"). This
// GDM entry tracks the extents for regions. Extents are in bytes.
+//
namespace { class VISIBILITY_HIDDEN RegionExtents {}; }
static int RegionExtentsIndex = 0;
namespace clang {
RegionViews::Factory RVFactory;
GRStateManager& StateMgr;
- MemRegionManager MRMgr;
public:
RegionStoreManager(GRStateManager& mgr)
- : RBFactory(mgr.getAllocator()),
+ : StoreManager(mgr.getAllocator()),
+ RBFactory(mgr.getAllocator()),
RVFactory(mgr.getAllocator()),
- StateMgr(mgr),
- MRMgr(StateMgr.getAllocator()) {}
+ StateMgr(mgr) {}
virtual ~RegionStoreManager() {}