Simplify code by using ConstantInt::getRawValue instead of checking to see
whether the constant is signed or unsigned, then casting

llvm-svn: 7252
diff --git a/llvm/lib/Support/ConstantRange.cpp b/llvm/lib/Support/ConstantRange.cpp
index b7ef5e0..c9d8ae6 100644
--- a/llvm/lib/Support/ConstantRange.cpp
+++ b/llvm/lib/Support/ConstantRange.cpp
@@ -126,10 +126,7 @@
   // 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();
 }