fix crash in my previous patch
llvm-svn: 86987
diff --git a/llvm/lib/Support/ConstantRange.cpp b/llvm/lib/Support/ConstantRange.cpp
index 4593eb9..e427f82 100644
--- a/llvm/lib/Support/ConstantRange.cpp
+++ b/llvm/lib/Support/ConstantRange.cpp
@@ -618,7 +618,7 @@
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);