From 4aea9d3d47e7e47630704fdf6628221fa45f6151 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 2 Jun 2009 17:01:00 +0000 Subject: Use ConstantExpr::alloc instead of ref directly - The "constant optimization" embedded inside ref is going away. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72730 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Expr/ExprPPrinter.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/Expr/ExprPPrinter.cpp') diff --git a/lib/Expr/ExprPPrinter.cpp b/lib/Expr/ExprPPrinter.cpp index dc7f4f64..fd367f23 100644 --- a/lib/Expr/ExprPPrinter.cpp +++ b/lib/Expr/ExprPPrinter.cpp @@ -240,7 +240,8 @@ class PPrinter : public ExprPPrinter { // Get stride expr in proper index width. Expr::Width idxWidth = base->index.getWidth(); - ref strideExpr(stride, idxWidth), offset(0, idxWidth); + ref strideExpr = ConstantExpr::alloc(stride, idxWidth); + ref offset = ConstantExpr::alloc(0, idxWidth); for (unsigned i=1; igetNumKids(); ++i) { const ReadExpr *re = dyn_ref_cast(ep->getKid(i)); if (!re) @@ -357,7 +358,7 @@ public: // Detect Not. // FIXME: This should be in common code. if (const EqExpr *ee = dyn_ref_cast(e)) { - if (ee->left == ref(false, Expr::Bool)) { + if (ee->left == ConstantExpr::alloc(false, Expr::Bool)) { PC << "(Not"; printWidth(PC, e); PC << ' '; @@ -443,7 +444,7 @@ void ExprPPrinter::printOne(std::ostream &os, void ExprPPrinter::printConstraints(std::ostream &os, const ConstraintManager &constraints) { - printQuery(os, constraints, ref(false, Expr::Bool)); + printQuery(os, constraints, ConstantExpr::alloc(false, Expr::Bool)); } void ExprPPrinter::printQuery(std::ostream &os, -- cgit 1.4.1