From f8fcac7470793ac2315873a12bec6c98778f8724 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Thu, 12 Nov 2009 15:10:33 +0000 Subject: fix crash in my previous patch llvm-svn: 86987 --- llvm/lib/Support/ConstantRange.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Support/ConstantRange.cpp') 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); -- cgit v1.2.3