Correct the implelmentation of ConstantInt::getAllOnesValue() for bit

widths > 64 bits.

llvm-svn: 34663
This commit is contained in:
Reid Spencer 2007-02-27 07:57:53 +00:00
parent 1e498b04f5
commit 74764708fa

View File

@ -118,7 +118,7 @@ ConstantInt *ConstantInt::getAllOnesValue(const Type *Ty) {
if (ITy->getBitWidth() == 1)
return ConstantInt::getTrue();
else
return ConstantInt::get(Ty, int64_t(-1));
return ConstantInt::get(Ty, APInt::getAllOnesValue(ITy->getBitWidth()));
return 0;
}