[Mlir-commits] [mlir] ca1a8be - [Transforms] Fix a warning
Kazu Hirata
llvmlistbot at llvm.org
Fri Nov 5 19:30:34 PDT 2021
Author: Kazu Hirata
Date: 2021-11-05T19:30:14-07:00
New Revision: ca1a8be06b230192ff37109be51c0a1daaff3e56
URL: https://github.com/llvm/llvm-project/commit/ca1a8be06b230192ff37109be51c0a1daaff3e56
DIFF: https://github.com/llvm/llvm-project/commit/ca1a8be06b230192ff37109be51c0a1daaff3e56.diff
LOG: [Transforms] Fix a warning
This patch fixes:
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp:124:3:
error: default label in switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]
by removing the default case.
Added:
Modified:
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
index 1ef4ea854a0c..77e0ff16ba28 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
@@ -121,8 +121,6 @@ constantDimLevelTypeEncoding(ConversionPatternRewriter &rewriter, Location loc,
case SparseTensorEncodingAttr::DimLevelType::Singleton:
dlt2 = DimLevelType::kSingleton;
break;
- default:
- llvm_unreachable("Unknown SparseTensorEncodingAttr::DimLevelType");
}
return constantI8(rewriter, loc, static_cast<uint8_t>(dlt2));
}
More information about the Mlir-commits
mailing list