diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-04 05:18:31 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-04 05:18:31 +0000 |
commit | c35afac49b59fab490b8a369420c76cfff3d72fa (patch) | |
tree | f6007dd12e54df74048dea00a0f2b8f130e170f8 /lib/Expr | |
parent | 5ead9bf5153952ae45ea5c1e8933fa03a6dc85c6 (diff) | |
download | klee-c35afac49b59fab490b8a369420c76cfff3d72fa.tar.gz |
Use cast<> instead of static_ref_cast.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Expr')
-rw-r--r-- | lib/Expr/Constraints.cpp | 4 | ||||
-rw-r--r-- | lib/Expr/Expr.cpp | 16 | ||||
-rw-r--r-- | lib/Expr/ExprPPrinter.cpp | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/lib/Expr/Constraints.cpp b/lib/Expr/Constraints.cpp index 93384060..3fa58ffd 100644 --- a/lib/Expr/Constraints.cpp +++ b/lib/Expr/Constraints.cpp @@ -127,14 +127,14 @@ void ConstraintManager::addConstraintInternal(ref<Expr> e) { // split to enable finer grained independence and other optimizations case Expr::And: { - BinaryExpr *be = static_ref_cast<BinaryExpr>(e); + BinaryExpr *be = cast<BinaryExpr>(e); addConstraintInternal(be->left); addConstraintInternal(be->right); break; } case Expr::Eq: { - BinaryExpr *be = static_ref_cast<BinaryExpr>(e); + BinaryExpr *be = cast<BinaryExpr>(e); if (be->left->isConstant()) { ExprReplaceVisitor visitor(be->right, be->left); rewriteConstraints(visitor); diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp index 9a78f188..3d3b6dd7 100644 --- a/lib/Expr/Expr.cpp +++ b/lib/Expr/Expr.cpp @@ -439,8 +439,8 @@ ref<Expr> ConcatExpr::create(const ref<Expr> &l, const ref<Expr> &r) { // Merge contiguous Extracts if (l->getKind() == Expr::Extract && r->getKind() == Expr::Extract) { - const ExtractExpr* ee_left = static_ref_cast<ExtractExpr>(l); - const ExtractExpr* ee_right = static_ref_cast<ExtractExpr>(r); + const ExtractExpr* ee_left = cast<ExtractExpr>(l); + const ExtractExpr* ee_right = cast<ExtractExpr>(r); if (ee_left->expr == ee_right->expr && ee_right->offset + ee_right->width == ee_left->offset) { return ExtractExpr::create(ee_left->expr, ee_right->offset, w); @@ -985,7 +985,7 @@ static ref<Expr> EqExpr_createPartialR(const ref<Expr> &cl, Expr *r) { // 0 != ... if (rk == Expr::Eq) { - const EqExpr *ree = static_ref_cast<EqExpr>(r); + const EqExpr *ree = cast<EqExpr>(r); // eliminate double negation if (ree->left->isConstant() && @@ -994,7 +994,7 @@ static ref<Expr> EqExpr_createPartialR(const ref<Expr> &cl, Expr *r) { return ree->right; } } else if (rk == Expr::Or) { - const OrExpr *roe = static_ref_cast<OrExpr>(r); + const OrExpr *roe = cast<OrExpr>(r); // transform not(or(a,b)) to and(not a, not b) return AndExpr::create(Expr::createNot(roe->left), @@ -1003,7 +1003,7 @@ static ref<Expr> EqExpr_createPartialR(const ref<Expr> &cl, Expr *r) { } } else if (rk == Expr::SExt) { // (sext(a,T)==c) == (a==c) - const SExtExpr *see = static_ref_cast<SExtExpr>(r); + const SExtExpr *see = cast<SExtExpr>(r); Expr::Width fromBits = see->src->getWidth(); uint64_t trunc = bits64::truncateToNBits(value, fromBits); @@ -1016,7 +1016,7 @@ static ref<Expr> EqExpr_createPartialR(const ref<Expr> &cl, Expr *r) { } } else if (rk == Expr::ZExt) { // (zext(a,T)==c) == (a==c) - const ZExtExpr *zee = static_ref_cast<ZExtExpr>(r); + const ZExtExpr *zee = cast<ZExtExpr>(r); Expr::Width fromBits = zee->src->getWidth(); uint64_t trunc = bits64::truncateToNBits(value, fromBits); @@ -1028,14 +1028,14 @@ static ref<Expr> EqExpr_createPartialR(const ref<Expr> &cl, Expr *r) { return ConstantExpr::create(0, Expr::Bool); } } else if (rk==Expr::Add) { - const AddExpr *ae = static_ref_cast<AddExpr>(r); + const AddExpr *ae = cast<AddExpr>(r); if (ae->left->isConstant()) { // c0 = c1 + b => c0 - c1 = b return EqExpr_createPartialR(SubExpr::create(cl, ae->left), ae->right.get()); } } else if (rk==Expr::Sub) { - const SubExpr *se = static_ref_cast<SubExpr>(r); + const SubExpr *se = cast<SubExpr>(r); if (se->left->isConstant()) { // c0 = c1 - b => c1 - c0 = b return EqExpr_createPartialR(SubExpr::create(se->left, cl), diff --git a/lib/Expr/ExprPPrinter.cpp b/lib/Expr/ExprPPrinter.cpp index e996b260..6be93c38 100644 --- a/lib/Expr/ExprPPrinter.cpp +++ b/lib/Expr/ExprPPrinter.cpp @@ -290,7 +290,7 @@ class PPrinter : public ExprPPrinter { return NULL; if (stride == -1) - return static_ref_cast<ReadExpr>(e.get()); + return cast<ReadExpr>(e.get()); else return base; } |