Fix a -Wcovered-switch-default warning by moving the unreachable out of the
authorEric Christopher <echristo@gmail.com>
Fri, 27 Dec 2019 02:34:41 +0000 (18:34 -0800)
committerEric Christopher <echristo@gmail.com>
Fri, 27 Dec 2019 02:34:41 +0000 (18:34 -0800)
covered switch.

mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h

index 97fbede..5c43c40 100644 (file)
@@ -32,9 +32,8 @@ inline StringRef toString(IterType t) {
     return getParallelIteratorTypeName();
   case IterType::Reduction:
     return getReductionIteratorTypeName();
-  default:
-    llvm_unreachable("Unsupport IterType");
   }
+  llvm_unreachable("Unsupported IterType");
 }
 
 /// A StructuredIndexed represents a captured value that can be indexed and