[cfe-commits] r60151 - /cfe/trunk/lib/Analysis/BasicConstraintManager.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Wed Nov 26 22:08:40 PST 2008
Author: zhongxingxu
Date: Thu Nov 27 00:08:40 2008
New Revision: 60151
URL: http://llvm.org/viewvc/llvm-project?rev=60151&view=rev
Log:
Factory objects should not be temporary. It caches all objects in the set.
Modified:
cfe/trunk/lib/Analysis/BasicConstraintManager.cpp
Modified: cfe/trunk/lib/Analysis/BasicConstraintManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BasicConstraintManager.cpp?rev=60151&r1=60150&r2=60151&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/BasicConstraintManager.cpp (original)
+++ cfe/trunk/lib/Analysis/BasicConstraintManager.cpp Thu Nov 27 00:08:40 2008
@@ -29,9 +29,10 @@
// 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::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.
More information about the cfe-commits
mailing list