mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-06 03:08:43 +00:00
Simplify some code
llvm-svn: 30658
This commit is contained in:
parent
18284b15a8
commit
7851529456
@ -30,8 +30,8 @@
|
|||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
static ConstantIntegral *Next(ConstantIntegral *CI) {
|
static ConstantIntegral *Next(ConstantIntegral *CI) {
|
||||||
if (CI->getType() == Type::BoolTy)
|
if (ConstantBool *CB = dyn_cast<ConstantBool>(CI))
|
||||||
return CI == ConstantBool::True ? ConstantBool::False : ConstantBool::True;
|
return ConstantBool::get(!CB->getValue());
|
||||||
|
|
||||||
Constant *Result = ConstantExpr::getAdd(CI,
|
Constant *Result = ConstantExpr::getAdd(CI,
|
||||||
ConstantInt::get(CI->getType(), 1));
|
ConstantInt::get(CI->getType(), 1));
|
||||||
|
Loading…
Reference in New Issue
Block a user