Remove unnecessary default cases in switches that cover all enum values.
[oota-llvm.git] / lib / Support / APFloat.cpp
index 0ae6f1c39e3462c428fff0572982ba21d68c3089..f4ca0fb014491eb18b1e187b339da91ea2e11fde 100644 (file)
@@ -1150,9 +1150,6 @@ APFloat::roundAwayFromZero(roundingMode rounding_mode,
   assert(lost_fraction != lfExactlyZero);
 
   switch (rounding_mode) {
-  default:
-    llvm_unreachable(0);
-
   case rmNearestTiesToAway:
     return lost_fraction == lfExactlyHalf || lost_fraction == lfMoreThanHalf;
 
@@ -1917,6 +1914,7 @@ APFloat::convert(const fltSemantics &toSemantics,
     fs = opOK;
   } else {
     *losesInfo = false;
+    fs = opOK;
   }
 
   return fs;