diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2009-11-12 15:10:33 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2009-11-12 15:10:33 +0000 |
commit | 4459145c2ccb5d063841a5d8c76b8b8ac9adaf2f (patch) | |
tree | f0819d18e464655342c81d36b9c7f9fb3187bb0c /lib/Support/ConstantRange.cpp | |
parent | 34e992da381bf8b1a9cbcc1bde0b117207809649 (diff) |
fix crash in my previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/ConstantRange.cpp')
-rw-r--r-- | lib/Support/ConstantRange.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp index 4593eb9dff..e427f820c4 100644 --- a/lib/Support/ConstantRange.cpp +++ b/lib/Support/ConstantRange.cpp @@ -618,7 +618,7 @@ ConstantRange::shl(const ConstantRange &Amount) const { APInt max = getUnsignedMax() << Amount.getUnsignedMax(); // there's no overflow! - APInt Zeros(sizeof(unsigned)*8, getUnsignedMax().countLeadingZeros()); + APInt Zeros(getBitWidth(), getUnsignedMax().countLeadingZeros()); if (Zeros.uge(Amount.getUnsignedMax())) return ConstantRange(min, max); |