From c35afac49b59fab490b8a369420c76cfff3d72fa Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 4 Jun 2009 05:18:31 +0000 Subject: Use cast<> instead of static_ref_cast. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72845 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Core/ImpliedValue.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/Core') diff --git a/lib/Core/ImpliedValue.cpp b/lib/Core/ImpliedValue.cpp index d1037839..8ebc0aef 100644 --- a/lib/Core/ImpliedValue.cpp +++ b/lib/Core/ImpliedValue.cpp @@ -43,7 +43,7 @@ static void _getImpliedValue(ref e, // under certain circumstances (all values known, known value // unique, or range known, max / min hit). Seems unlikely this // would work often enough to be worth the effort. - ReadExpr *re = static_ref_cast(e); + ReadExpr *re = cast(e); results.push_back(std::make_pair(re, ConstantExpr::create(value, e->getWidth()))); break; @@ -51,7 +51,7 @@ static void _getImpliedValue(ref e, case Expr::Select: { // not much to do, could improve with range analysis - SelectExpr *se = static_ref_cast(e); + SelectExpr *se = cast(e); if (se->trueExpr->isConstant()) { if (se->falseExpr->isConstant()) { @@ -70,7 +70,7 @@ static void _getImpliedValue(ref e, } case Expr::Concat: { - ConcatExpr *ce = static_ref_cast(e); + ConcatExpr *ce = cast(e); _getImpliedValue(ce->getKid(0), (value >> ce->getKid(1)->getWidth()) & ((1 << ce->getKid(0)->getWidth()) - 1), results); _getImpliedValue(ce->getKid(1), value & ((1 << ce->getKid(1)->getWidth()) - 1), results); break; @@ -85,7 +85,7 @@ static void _getImpliedValue(ref e, case Expr::ZExt: case Expr::SExt: { - CastExpr *ce = static_ref_cast(e); + CastExpr *ce = cast(e); _getImpliedValue(ce->src, bits64::truncateToNBits(value, ce->src->getWidth()), @@ -96,7 +96,7 @@ static void _getImpliedValue(ref e, // Arithmetic case Expr::Add: { // constants on left - BinaryExpr *be = static_ref_cast(e); + BinaryExpr *be = cast(e); if (be->left->isConstant()) { uint64_t nvalue = ints::sub(value, be->left->getConstantValue(), @@ -106,7 +106,7 @@ static void _getImpliedValue(ref e, break; } case Expr::Sub: { // constants on left - BinaryExpr *be = static_ref_cast(e); + BinaryExpr *be = cast(e); if (be->left->isConstant()) { uint64_t nvalue = ints::sub(be->left->getConstantValue(), value, @@ -131,7 +131,7 @@ static void _getImpliedValue(ref e, // Binary case Expr::And: { - BinaryExpr *be = static_ref_cast(e); + BinaryExpr *be = cast(e); if (be->getWidth() == Expr::Bool) { if (value) { _getImpliedValue(be->left, value, results); @@ -145,7 +145,7 @@ static void _getImpliedValue(ref e, break; } case Expr::Or: { - BinaryExpr *be = static_ref_cast(e); + BinaryExpr *be = cast(e); if (!value) { _getImpliedValue(be->left, 0, results); _getImpliedValue(be->right, 0, results); @@ -155,7 +155,7 @@ static void _getImpliedValue(ref e, break; } case Expr::Xor: { // constants on left - BinaryExpr *be = static_ref_cast(e); + BinaryExpr *be = cast(e); if (be->left->isConstant()) { _getImpliedValue(be->right, value ^ be->left->getConstantValue(), results); } @@ -167,7 +167,7 @@ static void _getImpliedValue(ref e, value = !value; /* fallthru */ case Expr::Eq: { - EqExpr *ee = static_ref_cast(e); + EqExpr *ee = cast(e); if (value) { if (ee->left->isConstant()) _getImpliedValue(ee->right, ee->left->getConstantValue(), results); -- cgit 1.4.1