mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-16 00:18:06 +00:00
Remove some redundancy.
llvm-svn: 34702
This commit is contained in:
parent
4357509984
commit
58f7a497bb
@ -115,10 +115,7 @@ Constant *Constant::getNullValue(const Type *Ty) {
|
||||
// Static constructor to create an integral constant with all bits set
|
||||
ConstantInt *ConstantInt::getAllOnesValue(const Type *Ty) {
|
||||
if (const IntegerType* ITy = dyn_cast<IntegerType>(Ty))
|
||||
if (ITy->getBitWidth() == 1)
|
||||
return ConstantInt::getTrue();
|
||||
else
|
||||
return ConstantInt::get(Ty, APInt::getAllOnesValue(ITy->getBitWidth()));
|
||||
return ConstantInt::get(Ty, APInt::getAllOnesValue(ITy->getBitWidth()));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user