fix reversal bug in preceding checkin
authorDale Johannesen <dalej@apple.com>
Tue, 4 Sep 2007 17:32:27 +0000 (17:32 +0000)
committerDale Johannesen <dalej@apple.com>
Tue, 4 Sep 2007 17:32:27 +0000 (17:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41705 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/StringExtras.h

index d292607fd5d491a6be8ad196d9e48d9321519a65..c7df4b6581747970c21dd95fc65241197982ca51 100644 (file)
@@ -94,9 +94,9 @@ static inline std::string ftostr(double V) {
 }
 
 static inline std::string ftostr(const APFloat& V) {
-  if (&V.getSemantics() == &APFloat::IEEEsingle)
+  if (&V.getSemantics() == &APFloat::IEEEdouble)
     return ftostr(V.convertToDouble());
-  else if (&V.getSemantics() == &APFloat::IEEEdouble)
+  else if (&V.getSemantics() == &APFloat::IEEEsingle)
     return ftostr((double)V.convertToFloat());
   return 0; // error
 }