diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-05 06:15:06 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-05 06:15:06 +0000 |
commit | fe42c702fc0a15090941ff6565f0d17f94ba8d02 (patch) | |
tree | 4bc23d8649f524bd00bcdf0dcc228ebf5d328f81 /lib/Solver | |
parent | 4d1f38fb2671e565b7aaeb2dd0db79b16adc3349 (diff) | |
download | klee-fe42c702fc0a15090941ff6565f0d17f94ba8d02.tar.gz |
Clean up a number of unused variable warnings when building w/o
asserts. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72924 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Solver')
-rw-r--r-- | lib/Solver/IncompleteSolver.cpp | 12 | ||||
-rw-r--r-- | lib/Solver/STPBuilder.cpp | 8 | ||||
-rw-r--r-- | lib/Solver/Solver.cpp | 12 |
3 files changed, 22 insertions, 10 deletions
diff --git a/lib/Solver/IncompleteSolver.cpp b/lib/Solver/IncompleteSolver.cpp index f473f70b..a565bab2 100644 --- a/lib/Solver/IncompleteSolver.cpp +++ b/lib/Solver/IncompleteSolver.cpp @@ -19,12 +19,12 @@ using namespace llvm; IncompleteSolver::PartialValidity IncompleteSolver::negatePartialValidity(PartialValidity pv) { switch(pv) { - case MustBeTrue: return MustBeFalse; - case MustBeFalse: return MustBeTrue; - case MayBeTrue: return MayBeFalse; - case MayBeFalse: return MayBeTrue; - case TrueOrFalse: return TrueOrFalse; - default: assert(0 && "invalid partial validity"); + default: assert(0 && "invalid partial validity"); + case MustBeTrue: return MustBeFalse; + case MustBeFalse: return MustBeTrue; + case MayBeTrue: return MayBeFalse; + case MayBeFalse: return MayBeTrue; + case TrueOrFalse: return TrueOrFalse; } } diff --git a/lib/Solver/STPBuilder.cpp b/lib/Solver/STPBuilder.cpp index 5b3fdd60..680b7d43 100644 --- a/lib/Solver/STPBuilder.cpp +++ b/lib/Solver/STPBuilder.cpp @@ -92,12 +92,11 @@ STPBuilder::~STPBuilder() { ExprHandle STPBuilder::getTempVar(Expr::Width w) { switch (w) { + default: assert(0 && "invalid type"); case Expr::Int8: return tempVars[0]; case Expr::Int16: return tempVars[1]; case Expr::Int32: return tempVars[2]; case Expr::Int64: return tempVars[3]; - default: - assert(0 && "invalid type"); } } @@ -760,8 +759,9 @@ ExprHandle STPBuilder::constructActual(ref<Expr> e, int *width_out) { ExprHandle left = construct(ee->left, width_out); ExprHandle right = construct(ee->right, width_out); if (*width_out==1) { - if (ConstantExpr *CE = dyn_cast<ConstantExpr>(ee->left)) { - assert(!CE->getConstantValue() && "uncanonicalized eq"); + if (isa<ConstantExpr>(ee->left)) { + assert(!cast<ConstantExpr>(ee->left)->getConstantValue() && + "uncanonicalized eq"); return vc_notExpr(vc, right); } else { return vc_iffExpr(vc, left, right); diff --git a/lib/Solver/Solver.cpp b/lib/Solver/Solver.cpp index a673e9e7..936f252d 100644 --- a/lib/Solver/Solver.cpp +++ b/lib/Solver/Solver.cpp @@ -172,7 +172,10 @@ std::pair< ref<Expr>, ref<Expr> > Solver::getRange(const Query& query) { width)), ConstantExpr::create(0, width))), res); + assert(success && "FIXME: Unhandled solver failure"); + (void) success; + if (res) { hi = mid; } else { @@ -191,7 +194,10 @@ std::pair< ref<Expr>, ref<Expr> > Solver::getRange(const Query& query) { mayBeTrue(query.withExpr(EqExpr::create(e, ConstantExpr::create(0, width))), res); + assert(success && "FIXME: Unhandled solver failure"); + (void) success; + if (res) { min = 0; } else { @@ -205,7 +211,10 @@ std::pair< ref<Expr>, ref<Expr> > Solver::getRange(const Query& query) { ConstantExpr::create(mid, width))), res); + assert(success && "FIXME: Unhandled solver failure"); + (void) success; + if (res) { hi = mid; } else { @@ -226,7 +235,10 @@ std::pair< ref<Expr>, ref<Expr> > Solver::getRange(const Query& query) { ConstantExpr::create(mid, width))), res); + assert(success && "FIXME: Unhandled solver failure"); + (void) success; + if (res) { hi = mid; } else { |