diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-27 07:57:53 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-27 07:57:53 +0000 |
commit | 8374db81a85e992867c052254273b1adf1bc5621 (patch) | |
tree | 465754e5b08076dcb23f1de5f78a1f54932977e2 | |
parent | b4d8ae5dfb2936b1da498e65a7f23af2f9dfccd0 (diff) |
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
-rw-r--r-- | lib/VMCore/Constants.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 64c2650ec1..0c50796433 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -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; } |