combineLostFractions does not need to be a member function
authorNeil Booth <neil@daikokuya.co.uk>
Sun, 7 Oct 2007 08:51:21 +0000 (08:51 +0000)
committerNeil Booth <neil@daikokuya.co.uk>
Sun, 7 Oct 2007 08:51:21 +0000 (08:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42729 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/APFloat.h
lib/Support/APFloat.cpp

index efd19d2c562bd64eaae92a1fe706e5b443ab2f20..d62b5c20c6548920eb761ad1a71e5d37419445fd 100644 (file)
@@ -268,7 +268,6 @@ namespace llvm {
     bool roundAwayFromZero(roundingMode, lostFraction, unsigned int) const;
     opStatus convertFromUnsignedInteger(integerPart *, unsigned int,
                                         roundingMode);
-    lostFraction combineLostFractions(lostFraction, lostFraction);
     opStatus convertFromHexadecimalString(const char *, roundingMode);
     char *convertNormalToHexString(char *, unsigned int, bool,
                                    roundingMode) const;
index ac2e5f2c2765c089922d0f441e139266ea41d0ee..2037210e05ba91ee4e97d5189614ac2214437433 100644 (file)
@@ -222,6 +222,20 @@ namespace {
     return lost_fraction;
   }
 
+  /* Combine the effect of two lost fractions.  */
+  lostFraction
+  combineLostFractions(lostFraction moreSignificant,
+                       lostFraction lessSignificant)
+  {
+    if(lessSignificant != lfExactlyZero) {
+      if(moreSignificant == lfExactlyZero)
+        moreSignificant = lfLessThanHalf;
+      else if(moreSignificant == lfExactlyHalf)
+        moreSignificant = lfMoreThanHalf;
+    }
+
+    return moreSignificant;
+  }
 
   /* Zero at the end to avoid modular arithmetic when adding one; used
      when rounding up during hexadecimal output.  */
@@ -429,21 +443,6 @@ APFloat::significandParts()
     return &significand.part;
 }
 
-/* Combine the effect of two lost fractions.  */
-lostFraction
-APFloat::combineLostFractions(lostFraction moreSignificant,
-                              lostFraction lessSignificant)
-{
-  if(lessSignificant != lfExactlyZero) {
-    if(moreSignificant == lfExactlyZero)
-      moreSignificant = lfLessThanHalf;
-    else if(moreSignificant == lfExactlyHalf)
-      moreSignificant = lfMoreThanHalf;
-  }
-
-  return moreSignificant;
-}
-
 void
 APFloat::zeroSignificand()
 {
@@ -1614,7 +1613,7 @@ APFloat::convertFromHexadecimalString(const char *p,
   partsCount = partCount();
   bitPos = partsCount * integerPartWidth;
 
-  /* Skip leading zeroes and any(hexa)decimal point.  */
+  /* Skip leading zeroes and any (hexa)decimal point.  */
   p = skipLeadingZeroesAndAnyDot(p, &dot);
   firstSignificantDigit = p;