[Mlir-commits] [mlir] bda763a - [mlir] Fix -Wreturn-type in MeshOps.cpp (NFC)

Jie Fu llvmlistbot at llvm.org
Fri Nov 3 17:48:15 PDT 2023


Author: Jie Fu
Date: 2023-11-04T08:47:30+08:00
New Revision: bda763aea0b854178c01eac9f309042d9aaa823b

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

LOG: [mlir] Fix -Wreturn-type in MeshOps.cpp (NFC)

/llvm-project/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp:73:1: error: non-void function does not return a value in all control paths [-Werror,-Wreturn-type]
}
^
1 error generated.

Added: 
    

Modified: 
    mlir/lib/Dialect/Mesh/IR/MeshOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp b/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
index 0521147ba2fdff9..588704f24574f90 100644
--- a/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
+++ b/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
@@ -68,7 +68,7 @@ Partial mesh::getPartialTypeFromReduction(IteratorType iType) {
   case IteratorType::ReductionMin:
     return Partial::Min;
   default:
-    assert(0 && "No corresponding partial type can be found");
+    llvm_unreachable("No corresponding partial type can be found");
   }
 }
 


        


More information about the Mlir-commits mailing list