[Mlir-commits] [mlir] 66ff408 - [mlir] Fix a warning

Kazu Hirata llvmlistbot at llvm.org
Tue Aug 29 13:13:08 PDT 2023


Author: Kazu Hirata
Date: 2023-08-29T12:21:17-07:00
New Revision: 66ff408c724a5c349d43393aea8bb10e52cc3d48

URL: https://github.com/llvm/llvm-project/commit/66ff408c724a5c349d43393aea8bb10e52cc3d48
DIFF: https://github.com/llvm/llvm-project/commit/66ff408c724a5c349d43393aea8bb10e52cc3d48.diff

LOG: [mlir] Fix a warning

This patch fixes:

  mlir/lib/Target/Cpp/TranslateToCpp.cpp:320:3: error: default label
  in switch which covers all enumeration values
  [-Werror,-Wcovered-switch-default]

Added: 
    

Modified: 
    mlir/lib/Target/Cpp/TranslateToCpp.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Target/Cpp/TranslateToCpp.cpp b/mlir/lib/Target/Cpp/TranslateToCpp.cpp
index c36e202f1b17e2..91a4db9cb8be8e 100644
--- a/mlir/lib/Target/Cpp/TranslateToCpp.cpp
+++ b/mlir/lib/Target/Cpp/TranslateToCpp.cpp
@@ -317,8 +317,6 @@ static LogicalResult printOperation(CppEmitter &emitter, emitc::CmpOp cmpOp) {
   case emitc::CmpPredicate::three_way:
     binaryOperator = "<=>";
     break;
-  default:
-    return cmpOp.emitError("unhandled comparison predicate");
   }
 
   return printBinaryOperation(emitter, operation, binaryOperator);


        


More information about the Mlir-commits mailing list