about summary refs log tree commit diff homepage
path: root/lib/Solver/Solver.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-06-03 15:40:42 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-06-03 15:40:42 +0000
commit32461e170b16d2f6cbcd04830bf68ce2a6372db5 (patch)
tree59c8813624c9072d2ecd14526658d6751e5a9674 /lib/Solver/Solver.cpp
parentd55171601a0537506ddd05d37a1dabe372454a6d (diff)
downloadklee-32461e170b16d2f6cbcd04830bf68ce2a6372db5.tar.gz
Kill off specialized ref<> forwarding methods, in the interest of making it a
more standard reference counting wrapper.
 - The only interesting changes here are in Ref.h, everything else is just
   updating foo.method to use foo->method instead.


git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Solver/Solver.cpp')
-rw-r--r--lib/Solver/Solver.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Solver/Solver.cpp b/lib/Solver/Solver.cpp
index ae378ac1..8990e3b9 100644
--- a/lib/Solver/Solver.cpp
+++ b/lib/Solver/Solver.cpp
@@ -53,11 +53,11 @@ SolverImpl::~SolverImpl() {
 }
 
 bool Solver::evaluate(const Query& query, Validity &result) {
-  assert(query.expr.getWidth() == Expr::Bool && "Invalid expression type!");
+  assert(query.expr->getWidth() == Expr::Bool && "Invalid expression type!");
 
-  // Maintain invariants implementation expect.
+  // Maintain invariants implementations expect.
   if (query.expr.isConstant()) {
-    result = query.expr.getConstantValue() ? True : False;
+    result = query.expr->getConstantValue() ? True : False;
     return true;
   }
 
@@ -79,11 +79,11 @@ bool SolverImpl::computeValidity(const Query& query, Solver::Validity &result) {
 }
 
 bool Solver::mustBeTrue(const Query& query, bool &result) {
-  assert(query.expr.getWidth() == Expr::Bool && "Invalid expression type!");
+  assert(query.expr->getWidth() == Expr::Bool && "Invalid expression type!");
 
-  // Maintain invariants implementation expect.
+  // Maintain invariants implementations expect.
   if (query.expr.isConstant()) {
-    result = query.expr.getConstantValue() ? true : false;
+    result = query.expr->getConstantValue() ? true : false;
     return true;
   }
 
@@ -136,7 +136,7 @@ Solver::getInitialValues(const Query& query,
 
 std::pair< ref<Expr>, ref<Expr> > Solver::getRange(const Query& query) {
   ref<Expr> e = query.expr;
-  Expr::Width width = e.getWidth();
+  Expr::Width width = e->getWidth();
   uint64_t min, max;
 
   if (width==1) {
@@ -152,7 +152,7 @@ std::pair< ref<Expr>, ref<Expr> > Solver::getRange(const Query& query) {
       min = 0, max = 1; break;
     }
   } else if (e.isConstant()) {
-    min = max = e.getConstantValue();
+    min = max = e->getConstantValue();
   } else {
     // binary search for # of useful bits
     uint64_t lo=0, hi=width, mid, bits=0;