[PATCH] D75663: Fix a warning about an unreachable default in a switch statement.

Chris Lattner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 08:45:56 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGc2b2472ca8c3: Fix a warning about an unreachable default in a switch statement. (authored by lattner).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75663/new/

https://reviews.llvm.org/D75663

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


Index: mlir/lib/Dialect/StandardOps/IR/Ops.cpp
===================================================================
--- mlir/lib/Dialect/StandardOps/IR/Ops.cpp
+++ mlir/lib/Dialect/StandardOps/IR/Ops.cpp
@@ -695,9 +695,8 @@
     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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75663.248492.patch
Type: text/x-patch
Size: 497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200305/69571eee/attachment.bin>


More information about the llvm-commits mailing list