Remove some redundancy.

llvm-svn: 34702
This commit is contained in:
Reid Spencer 2007-02-27 23:27:26 +00:00
parent ee8aca0cfa
commit 3370b04a66
1 changed files with 1 additions and 4 deletions

View File

@ -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;
}