aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Core/TimingSolver.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-06-04 08:31:20 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-06-04 08:31:20 +0000
commitf870aa1e0723e9203df495020ee2bf2bc47a6246 (patch)
treed15a78c7c6f4106ce141fc92c8dce5dc8217bd84 /lib/Core/TimingSolver.cpp
parent44e3d58b59099f5fd0e6f88893ce431171b3fef6 (diff)
downloadklee-f870aa1e0723e9203df495020ee2bf2bc47a6246.tar.gz
Finish removing uses of Expr::isConstant.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72859 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Core/TimingSolver.cpp')
-rw-r--r--lib/Core/TimingSolver.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Core/TimingSolver.cpp b/lib/Core/TimingSolver.cpp
index 9efb77b8..b26551cc 100644
--- a/lib/Core/TimingSolver.cpp
+++ b/lib/Core/TimingSolver.cpp
@@ -25,8 +25,8 @@ using namespace llvm;
bool TimingSolver::evaluate(const ExecutionState& state, ref<Expr> expr,
Solver::Validity &result) {
// Fast path, to avoid timer and OS overhead.
- if (expr->isConstant()) {
- result = expr->getConstantValue() ? Solver::True : Solver::False;
+ if (ConstantExpr *CE = dyn_cast<ConstantExpr>(expr)) {
+ result = CE->getConstantValue() ? Solver::True : Solver::False;
return true;
}
@@ -49,8 +49,8 @@ bool TimingSolver::evaluate(const ExecutionState& state, ref<Expr> expr,
bool TimingSolver::mustBeTrue(const ExecutionState& state, ref<Expr> expr,
bool &result) {
// Fast path, to avoid timer and OS overhead.
- if (expr->isConstant()) {
- result = expr->getConstantValue() ? true : false;
+ if (ConstantExpr *CE = dyn_cast<ConstantExpr>(expr)) {
+ result = CE->getConstantValue() ? true : false;
return true;
}
@@ -96,7 +96,7 @@ bool TimingSolver::mayBeFalse(const ExecutionState& state, ref<Expr> expr,
bool TimingSolver::getValue(const ExecutionState& state, ref<Expr> expr,
ref<Expr> &result) {
// Fast path, to avoid timer and OS overhead.
- if (expr->isConstant()) {
+ if (isa<ConstantExpr>(expr)) {
result = expr;
return true;
}