[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
This commit is contained in:
wren romano 2022-09-29 17:24:01 -07:00
parent 923909afbe
commit c8944c9d4c
2 changed files with 4 additions and 1 deletions

View File

@ -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`.

View File

@ -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_));
}
}