[Mlir-commits] [mlir] c8944c9 - [mlir][sparse] Fixing case coverage warning
wren romano
llvmlistbot at llvm.org
Thu Sep 29 18:20:51 PDT 2022
Author: wren romano
Date: 2022-09-29T18:20:36-07:00
New Revision: c8944c9d4cd94dd676aff1e92a00ff0a0b285002
URL: https://github.com/llvm/llvm-project/commit/c8944c9d4cd94dd676aff1e92a00ff0a0b285002
DIFF: https://github.com/llvm/llvm-project/commit/c8944c9d4cd94dd676aff1e92a00ff0a0b285002.diff
LOG: [mlir][sparse] Fixing case coverage warning
Followup to D133835 for fixing the warning on LLVM's Windows buildbot
Reviewed By: aartbik, Peiming, stella.stamenova
Differential Revision: https://reviews.llvm.org/D134925
Added:
Modified:
mlir/include/mlir/ExecutionEngine/SparseTensor/File.h
mlir/lib/ExecutionEngine/SparseTensor/File.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/ExecutionEngine/SparseTensor/File.h b/mlir/include/mlir/ExecutionEngine/SparseTensor/File.h
index fb00e1ecbfc8..920246cb1001 100644
--- a/mlir/include/mlir/ExecutionEngine/SparseTensor/File.h
+++ b/mlir/include/mlir/ExecutionEngine/SparseTensor/File.h
@@ -44,7 +44,7 @@ namespace sparse_tensor {
/// as well as providing the buffers and methods for parsing those headers.
class SparseTensorFile final {
public:
- enum class ValueKind {
+ enum class ValueKind : uint8_t {
// The value before calling `readHeader`.
kInvalid = 0,
// Values that can be set by `readMMEHeader`.
diff --git a/mlir/lib/ExecutionEngine/SparseTensor/File.cpp b/mlir/lib/ExecutionEngine/SparseTensor/File.cpp
index 2ea00b34f3f9..dfe3e55e2ef8 100644
--- a/mlir/lib/ExecutionEngine/SparseTensor/File.cpp
+++ b/mlir/lib/ExecutionEngine/SparseTensor/File.cpp
@@ -107,6 +107,9 @@ bool SparseTensorFile::canReadAs(PrimaryType valTy) const {
// So we allow implicitly converting the stored values to both
// integer and floating primary-types.
return isRealPrimaryType(valTy);
+ default:
+ MLIR_SPARSETENSOR_FATAL("Unknown ValueKind: %d\n",
+ static_cast<uint8_t>(valueKind_));
}
}
More information about the Mlir-commits
mailing list