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

widths > 64 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34663 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2007-02-27 07:57:53 +00:00
parent b4d8ae5dfb
commit 8374db81a8

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