[Mlir-commits] [mlir] c2b2472 - Fix a warning about an unreachable default in a switch statement.

Chris Lattner llvmlistbot at llvm.org
Thu Mar 5 08:36:46 PST 2020


Author: Chris Lattner
Date: 2020-03-05T08:36:28-08:00
New Revision: c2b2472ca8c3abf272bdf24b5ce633f4bd27fbba

URL: https://github.com/llvm/llvm-project/commit/c2b2472ca8c3abf272bdf24b5ce633f4bd27fbba
DIFF: https://github.com/llvm/llvm-project/commit/c2b2472ca8c3abf272bdf24b5ce633f4bd27fbba.diff

LOG: Fix a warning about an unreachable default in a switch statement.

Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75663

Added: 
    

Modified: 
    mlir/lib/Dialect/StandardOps/IR/Ops.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
index 8e7233e8acda..21314970c199 100644
--- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
+++ b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
@@ -695,9 +695,8 @@ static bool applyCmpPredicate(CmpFPredicate predicate, const APFloat &lhs,
     return cmpResult == APFloat::cmpUnordered;
   case CmpFPredicate::AlwaysTrue:
     return true;
-  default:
-    llvm_unreachable("unknown comparison predicate");
   }
+  llvm_unreachable("unknown comparison predicate");
 }
 
 // Constant folding hook for comparisons.


        


More information about the Mlir-commits mailing list