summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/ConstantRange.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2009-11-12 15:10:33 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2009-11-12 15:10:33 +0000
commitf8fcac7470793ac2315873a12bec6c98778f8724 (patch)
tree79e8ef7561deb67f659b2f72e91bfdd21e7c8ff5 /llvm/lib/Support/ConstantRange.cpp
parent60d5b1cfdbfff556492282317bfaf8cc5aa44920 (diff)
downloadbcm5719-llvm-f8fcac7470793ac2315873a12bec6c98778f8724.tar.gz
bcm5719-llvm-f8fcac7470793ac2315873a12bec6c98778f8724.zip
fix crash in my previous patch
llvm-svn: 86987
Diffstat (limited to 'llvm/lib/Support/ConstantRange.cpp')
-rw-r--r--llvm/lib/Support/ConstantRange.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/ConstantRange.cpp b/llvm/lib/Support/ConstantRange.cpp
index 4593eb9dff9..e427f820c44 100644
--- a/llvm/lib/Support/ConstantRange.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud