mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-04 01:51:31 +00:00
Simplify some code
llvm-svn: 30658
This commit is contained in:
parent
18284b15a8
commit
7851529456
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user