Changes in directory llvm/lib/Analysis:
ConstantRange.cpp updated: 1.14 -> 1.15 --- Log message: Simplify some code --- Diffs of the changes: (+2 -2) ConstantRange.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Analysis/ConstantRange.cpp diff -u llvm/lib/Analysis/ConstantRange.cpp:1.14 llvm/lib/Analysis/ConstantRange.cpp:1.15 --- llvm/lib/Analysis/ConstantRange.cpp:1.14 Thu Apr 21 18:46:51 2005 +++ llvm/lib/Analysis/ConstantRange.cpp Thu Sep 28 18:14:29 2006 @@ -30,8 +30,8 @@ using namespace llvm; static ConstantIntegral *Next(ConstantIntegral *CI) { - if (CI->getType() == Type::BoolTy) - return CI == ConstantBool::True ? ConstantBool::False : ConstantBool::True; + if (ConstantBool *CB = dyn_cast<ConstantBool>(CI)) + return ConstantBool::get(!CB->getValue()); Constant *Result = ConstantExpr::getAdd(CI, ConstantInt::get(CI->getType(), 1)); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits