mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 20:26:07 +00:00
Remove some redundancy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34702 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -115,9 +115,6 @@ Constant *Constant::getNullValue(const Type *Ty) {
|
|||||||
// Static constructor to create an integral constant with all bits set
|
// Static constructor to create an integral constant with all bits set
|
||||||
ConstantInt *ConstantInt::getAllOnesValue(const Type *Ty) {
|
ConstantInt *ConstantInt::getAllOnesValue(const Type *Ty) {
|
||||||
if (const IntegerType* ITy = dyn_cast<IntegerType>(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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user