diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-14 08:16:07 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-14 08:16:07 +0000 |
commit | a162859920beccf91af1a3a5038c9cf15700d53b (patch) | |
tree | 7495ee6365b30f83b9412bc69b4a5b59ec83096a /lib/Expr | |
parent | 4177a3239de9ba23f29717bd2d13c57ffea0ead8 (diff) | |
download | klee-a162859920beccf91af1a3a5038c9cf15700d53b.tar.gz |
More ConstantExpr cleanup.
- Change Executor::evalConstant to return ConstantExpr. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73337 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Expr')
-rw-r--r-- | lib/Expr/Expr.cpp | 2 | ||||
-rw-r--r-- | lib/Expr/ExprEvaluator.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp index fd43018f..7beaa665 100644 --- a/lib/Expr/Expr.cpp +++ b/lib/Expr/Expr.cpp @@ -313,7 +313,7 @@ ref<Expr> Expr::createNot(ref<Expr> e) { return createIsZero(e); } -ref<Expr> Expr::createPointer(uint64_t v) { +ref<ConstantExpr> Expr::createPointer(uint64_t v) { return ConstantExpr::create(v, kMachinePointerType); } diff --git a/lib/Expr/ExprEvaluator.cpp b/lib/Expr/ExprEvaluator.cpp index efb0d658..1a146641 100644 --- a/lib/Expr/ExprEvaluator.cpp +++ b/lib/Expr/ExprEvaluator.cpp @@ -17,7 +17,7 @@ ExprVisitor::Action ExprEvaluator::evalRead(const UpdateList &ul, ref<Expr> ui = visit(un->index); if (ConstantExpr *CE = dyn_cast<ConstantExpr>(ui)) { - if (CE->getConstantValue() == index) + if (CE->getZExtValue() == index) return Action::changeTo(visit(un->value)); } else { // update index is unknown, so may or may not be index, we @@ -61,7 +61,7 @@ ExprVisitor::Action ExprEvaluator::visitRead(const ReadExpr &re) { ref<Expr> v = visit(re.index); if (ConstantExpr *CE = dyn_cast<ConstantExpr>(v)) { - return evalRead(re.updates, CE->getConstantValue()); + return evalRead(re.updates, CE->getZExtValue()); } else { return Action::doChildren(); } |