Simplify some code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30658 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2006-09-28 23:14:29 +00:00
parent 3295471846
commit 193c2d886f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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));
+2 -2
View File
@@ -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));