[mlir][sparse] Restore case coverage warning fix
authorNathaniel McVicar <namcvica@microsoft.com>
Tue, 4 Oct 2022 16:42:43 +0000 (09:42 -0700)
committerStella Stamenova <stilis@microsoft.com>
Tue, 4 Oct 2022 16:59:20 +0000 (09:59 -0700)
This restores the fix from D134925 to make MSVC and clang happy.

Reviewed By: stella.stamenova

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

mlir/lib/ExecutionEngine/SparseTensor/File.cpp

index eac3b02..b263231 100644 (file)
@@ -24,6 +24,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "mlir/ExecutionEngine/SparseTensor/File.h"
+#include "llvm/Support/ErrorHandling.h"
 
 #include <cctype>
 #include <cstring>
@@ -108,6 +109,7 @@ bool SparseTensorFile::canReadAs(PrimaryType valTy) const {
     // integer and floating primary-types.
     return isRealPrimaryType(valTy);
   }
+  llvm_unreachable("unknown ValueKind");
 }
 
 /// Helper to convert C-style strings (i.e., '\0' terminated) to lower case.