diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-04 00:49:34 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-04 00:49:34 +0000 |
commit | b9c0914f3d27e04e3335760b7fd13c5e9953103d (patch) | |
tree | cf3971704bc3c7bede7592b046f8f28b4751a423 /lib/Solver/FastCexSolver.cpp | |
parent | 32461e170b16d2f6cbcd04830bf68ce2a6372db5 (diff) | |
download | klee-b9c0914f3d27e04e3335760b7fd13c5e9953103d.tar.gz |
Move isConstant from ref<> to Expr::
- Ref.h is now freestanding. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72824 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Solver/FastCexSolver.cpp')
-rw-r--r-- | lib/Solver/FastCexSolver.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Solver/FastCexSolver.cpp b/lib/Solver/FastCexSolver.cpp index 88f34c99..ee46be4f 100644 --- a/lib/Solver/FastCexSolver.cpp +++ b/lib/Solver/FastCexSolver.cpp @@ -416,7 +416,7 @@ public: // XXX we need to respect the version here and object state chain - if (re->index.isConstant() && + if (re->index->isConstant() && re->index->getConstantValue() < array->size) { CexValueData &cvd = cod.values[re->index->getConstantValue()]; CexValueData tmp = cvd.set_intersection(range); @@ -613,7 +613,7 @@ public: case Expr::Eq: { BinaryExpr *be = static_ref_cast<BinaryExpr>(e); if (range.isFixed()) { - if (be->left.isConstant()) { + if (be->left->isConstant()) { uint64_t value = be->left->getConstantValue(); if (range.min()) { forceExprToValue(be->right, value); @@ -729,7 +729,7 @@ public: bool exprMustBeValue(ref<Expr> e, uint64_t value) { CexConstifier cc(objectValues); ref<Expr> v = cc.visit(e); - if (!v.isConstant()) return false; + if (!v->isConstant()) return false; // XXX reenable once all reads and vars are fixed // assert(v.isConstant() && "not all values have been fixed"); return v->getConstantValue() == value; @@ -886,7 +886,7 @@ bool FastCexSolver::computeValue(const Query& query, ref<Expr> &result) { CexConstifier cc(cd.objectValues); ref<Expr> value = cc.visit(query.expr); - if (value.isConstant()) { + if (value->isConstant()) { result = value; return true; } else { @@ -939,7 +939,7 @@ FastCexSolver::computeInitialValues(const Query& query, ConstantExpr::create(i, kMachinePointerType))); - if (value.isConstant()) { + if (value->isConstant()) { data.push_back(value->getConstantValue()); } else { // FIXME: When does this happen? |