aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-08-24 03:02:34 +0000
committerChris Lattner <sabre@nondot.org>2007-08-24 03:02:34 +0000
commitada530b4f552da1d122be0c6dbc936e689fc16fd (patch)
treef6b3877ee71520cb0f1f23ba82782f956b48c7e2
parent343e770983dcf53a1ea2dfca4e04d28ebc41138a (diff)
downloadexternal_llvm-ada530b4f552da1d122be0c6dbc936e689fc16fd.zip
external_llvm-ada530b4f552da1d122be0c6dbc936e689fc16fd.tar.gz
external_llvm-ada530b4f552da1d122be0c6dbc936e689fc16fd.tar.bz2
silence some warnings in an optimized build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41352 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Support/APFloat.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp
index ae435d1..ac43d23 100644
--- a/lib/Support/APFloat.cpp
+++ b/lib/Support/APFloat.cpp
@@ -915,20 +915,20 @@ APFloat::addOrSubtractSignificand(const APFloat &rhs, bool subtract)
APFloat temp_rhs(rhs);
bool reverse;
- if(bits == 0) {
+ if (bits == 0) {
reverse = compareAbsoluteValue(temp_rhs) == cmpLessThan;
lost_fraction = lfExactlyZero;
- } else if(bits > 0) {
+ } else if (bits > 0) {
lost_fraction = temp_rhs.shiftSignificandRight(bits - 1);
shiftSignificandLeft(1);
reverse = false;
- } else if(bits < 0) {
+ } else {
lost_fraction = shiftSignificandRight(-bits - 1);
temp_rhs.shiftSignificandLeft(1);
reverse = true;
}
- if(reverse) {
+ if (reverse) {
carry = temp_rhs.subtractSignificand
(*this, lost_fraction != lfExactlyZero);
copySignificand(temp_rhs);
@@ -1496,8 +1496,7 @@ APFloat::convertFromHexadecimalString(const char *p,
}
APFloat::opStatus
-APFloat::convertFromString(const char *p, roundingMode rounding_mode)
-{
+APFloat::convertFromString(const char *p, roundingMode rounding_mode) {
/* Handle a leading minus sign. */
if(*p == '-')
sign = 1, p++;
@@ -1506,11 +1505,9 @@ APFloat::convertFromString(const char *p, roundingMode rounding_mode)
if(p[0] == '0' && (p[1] == 'x' || p[1] == 'X'))
return convertFromHexadecimalString(p + 2, rounding_mode);
- else
- {
- assert(0 && "Decimal to binary conversions not yet implemented");
- abort();
- }
+
+ assert(0 && "Decimal to binary conversions not yet implemented");
+ abort();
}
// For good performance it is desirable for different APFloats