diff options
Diffstat (limited to 'lib/Solver/CexCachingSolver.cpp')
-rw-r--r-- | lib/Solver/CexCachingSolver.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Solver/CexCachingSolver.cpp b/lib/Solver/CexCachingSolver.cpp index 49db74e8..1eaec4d9 100644 --- a/lib/Solver/CexCachingSolver.cpp +++ b/lib/Solver/CexCachingSolver.cpp @@ -138,8 +138,8 @@ bool CexCachingSolver::lookupAssignment(const Query &query, Assignment *&result) { KeyType key(query.constraints.begin(), query.constraints.end()); ref<Expr> neg = Expr::createNot(query.expr); - if (neg->isConstant()) { - if (!neg->getConstantValue()) { + if (ConstantExpr *CE = dyn_cast<ConstantExpr>(neg)) { + if (!CE->getConstantValue()) { result = (Assignment*) 0; return true; } @@ -153,8 +153,8 @@ bool CexCachingSolver::lookupAssignment(const Query &query, bool CexCachingSolver::getAssignment(const Query& query, Assignment *&result) { KeyType key(query.constraints.begin(), query.constraints.end()); ref<Expr> neg = Expr::createNot(query.expr); - if (neg->isConstant()) { - if (!neg->getConstantValue()) { + if (ConstantExpr *CE = dyn_cast<ConstantExpr>(neg)) { + if (!CE->getConstantValue()) { result = (Assignment*) 0; return true; } |