[Mlir-commits] [mlir] db2b1e9 - [Utils] Fix a warning in DialectConversion.cpp
Kazu Hirata
llvmlistbot at llvm.org
Tue Oct 26 21:01:39 PDT 2021
Author: Kazu Hirata
Date: 2021-10-26T21:01:29-07:00
New Revision: db2b1e96f026f98a1f518fdac78c3321922f13e2
URL: https://github.com/llvm/llvm-project/commit/db2b1e96f026f98a1f518fdac78c3321922f13e2
DIFF: https://github.com/llvm/llvm-project/commit/db2b1e96f026f98a1f518fdac78c3321922f13e2.diff
LOG: [Utils] Fix a warning in DialectConversion.cpp
This patch fixes:
mlir/lib/Transforms/Utils/DialectConversion.cpp:2775:5: error:
default label in switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]
by removing the default case. This way, the compiler should issue a
warning in the future when somebody adds a new enum value without a
corresponding case in the switch statement.
Added:
Modified:
mlir/lib/Transforms/Utils/DialectConversion.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp
index b63ed594d537..d90439b6d12d 100644
--- a/mlir/lib/Transforms/Utils/DialectConversion.cpp
+++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp
@@ -2772,8 +2772,6 @@ static LogicalResult legalizeUnresolvedMaterialization(
newMaterialization = converter->materializeTargetConversion(
rewriter, op->getLoc(), outputType, inputOperands);
break;
- default:
- llvm_unreachable("unknown materialization kind");
}
if (newMaterialization) {
replaceMaterialization(rewriterImpl, opResult, newMaterialization,
More information about the Mlir-commits
mailing list