diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-02 17:01:00 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-02 17:01:00 +0000 |
commit | 4aea9d3d47e7e47630704fdf6628221fa45f6151 (patch) | |
tree | 5e74319cdcc91f362f6d27bd4befcb5c42131d66 /lib/Expr/ExprPPrinter.cpp | |
parent | 1016ee0df2a459881d6f9930f7b72929e8bdc8b8 (diff) | |
download | klee-4aea9d3d47e7e47630704fdf6628221fa45f6151.tar.gz |
Use ConstantExpr::alloc instead of ref<Expr> directly
- The "constant optimization" embedded inside ref<Expr> is going away. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72730 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Expr/ExprPPrinter.cpp')
-rw-r--r-- | lib/Expr/ExprPPrinter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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<Expr> strideExpr(stride, idxWidth), offset(0, idxWidth); + ref<Expr> strideExpr = ConstantExpr::alloc(stride, idxWidth); + ref<Expr> offset = ConstantExpr::alloc(0, idxWidth); for (unsigned i=1; i<ep->getNumKids(); ++i) { const ReadExpr *re = dyn_ref_cast<ReadExpr>(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<EqExpr>(e)) { - if (ee->left == ref<Expr>(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<Expr>(false, Expr::Bool)); + printQuery(os, constraints, ConstantExpr::alloc(false, Expr::Bool)); } void ExprPPrinter::printQuery(std::ostream &os, |