aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/RangeConstraintManager.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-06-18 22:57:13 +0000
committerTed Kremenek <kremenek@apple.com>2009-06-18 22:57:13 +0000
commita591bc04d21fa62ebffcb2c7814d738ca8f5e2f9 (patch)
tree1167c46c3841a123b649b8828a50b474ba814452 /lib/Analysis/RangeConstraintManager.cpp
parentf6ddb737cb882ffbf0b75a9abd50b930cc2b9068 (diff)
libAnalysis:
- Remove the 'isFeasible' flag from all uses of 'Assume'. - Remove the 'Assume' methods from GRStateManager. Now the only way to create a new GRState with an assumption is to use the new 'assume' methods in GRState. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73731 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RangeConstraintManager.cpp')
-rw-r--r--lib/Analysis/RangeConstraintManager.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/Analysis/RangeConstraintManager.cpp b/lib/Analysis/RangeConstraintManager.cpp
index 89f3a716d2..3b4d0c4122 100644
--- a/lib/Analysis/RangeConstraintManager.cpp
+++ b/lib/Analysis/RangeConstraintManager.cpp
@@ -239,22 +239,22 @@ public:
: SimpleConstraintManager(statemgr) {}
const GRState* AssumeSymNE(const GRState* St, SymbolRef sym,
- const llvm::APSInt& V, bool& isFeasible);
+ const llvm::APSInt& V);
const GRState* AssumeSymEQ(const GRState* St, SymbolRef sym,
- const llvm::APSInt& V, bool& isFeasible);
+ const llvm::APSInt& V);
const GRState* AssumeSymLT(const GRState* St, SymbolRef sym,
- const llvm::APSInt& V, bool& isFeasible);
+ const llvm::APSInt& V);
const GRState* AssumeSymGT(const GRState* St, SymbolRef sym,
- const llvm::APSInt& V, bool& isFeasible);
+ const llvm::APSInt& V);
const GRState* AssumeSymGE(const GRState* St, SymbolRef sym,
- const llvm::APSInt& V, bool& isFeasible);
+ const llvm::APSInt& V);
const GRState* AssumeSymLE(const GRState* St, SymbolRef sym,
- const llvm::APSInt& V, bool& isFeasible);
+ const llvm::APSInt& V);
const llvm::APSInt* getSymVal(const GRState* St, SymbolRef sym) const;
@@ -327,10 +327,9 @@ RangeConstraintManager::GetRange(const GRState *state, SymbolRef sym) {
#define AssumeX(OP)\
const GRState*\
RangeConstraintManager::AssumeSym ## OP(const GRState* state, SymbolRef sym,\
- const llvm::APSInt& V, bool& isFeasible){\
+ const llvm::APSInt& V){\
const RangeSet& R = GetRange(state, sym).Add##OP(state->getBasicVals(), F, V);\
- isFeasible = !R.isEmpty();\
- return isFeasible ? state->set<ConstraintRange>(sym, R) : 0;\
+ return !R.isEmpty() ? state->set<ConstraintRange>(sym, R) : NULL;\
}
AssumeX(EQ)