summaryrefslogtreecommitdiff
path: root/support/lib/Support/ConstantRange.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'support/lib/Support/ConstantRange.cpp')
-rw-r--r--support/lib/Support/ConstantRange.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/support/lib/Support/ConstantRange.cpp b/support/lib/Support/ConstantRange.cpp
index b7ef5e0511..c9d8ae6fbb 100644
--- a/support/lib/Support/ConstantRange.cpp
+++ b/support/lib/Support/ConstantRange.cpp
@@ -126,10 +126,7 @@ uint64_t ConstantRange::getSetSize() const {
// Simply subtract the bounds...
Constant *Result = *(Constant*)Upper - *(Constant*)Lower;
assert(Result && "Subtraction of constant integers not implemented?");
- if (getType()->isSigned())
- return (uint64_t)cast<ConstantSInt>(Result)->getValue();
- else
- return cast<ConstantUInt>(Result)->getValue();
+ return cast<ConstantInt>(Result)->getRawValue();
}