diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-11-27 06:08:40 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-11-27 06:08:40 +0000 |
commit | f0bc50eaa3fda5dd5d4148d385e25ac79151561b (patch) | |
tree | 94e2d51be7e4ddba8995ed6c3af77366f73eff3d /lib/Analysis/BasicConstraintManager.cpp | |
parent | d54847944292b5693d375b034b52820f3947d22f (diff) |
Factory objects should not be temporary. It caches all objects in the set.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60151 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicConstraintManager.cpp')
-rw-r--r-- | lib/Analysis/BasicConstraintManager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/BasicConstraintManager.cpp b/lib/Analysis/BasicConstraintManager.cpp index 7bed3931bf..5ce95a1e56 100644 --- a/lib/Analysis/BasicConstraintManager.cpp +++ b/lib/Analysis/BasicConstraintManager.cpp @@ -29,9 +29,10 @@ typedef llvm::ImmutableMap<SymbolID,const llvm::APSInt*> ConstEqTy; // constants and integer variables. class VISIBILITY_HIDDEN BasicConstraintManager : public ConstraintManager { GRStateManager& StateMgr; - + GRState::IntSetTy::Factory ISetFactory; public: - BasicConstraintManager(GRStateManager& statemgr) : StateMgr(statemgr) {} + BasicConstraintManager(GRStateManager& statemgr) + : StateMgr(statemgr), ISetFactory(statemgr.getAllocator()) {} virtual const GRState* Assume(const GRState* St, SVal Cond, bool Assumption, bool& isFeasible); @@ -409,7 +410,7 @@ const GRState* BasicConstraintManager::AddEQ(const GRState* St, SymbolID sym, const GRState* BasicConstraintManager::AddNE(const GRState* St, SymbolID sym, const llvm::APSInt& V) { - GRState::IntSetTy::Factory ISetFactory(StateMgr.getAllocator()); + GRStateRef state(St, StateMgr); // First, retrieve the NE-set associated with the given symbol. |