[Mlir-commits] [mlir] bc0cdef - [mlir] Fix warnings

Kazu Hirata llvmlistbot at llvm.org
Wed May 22 16:40:33 PDT 2024


Author: Kazu Hirata
Date: 2024-05-22T16:40:27-07:00
New Revision: bc0cdefffe621af7d79eb637f570297752d215c8

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

LOG: [mlir] Fix warnings

This patch fixes:

  mlir/lib/Dialect/Mesh/Transforms/ShardingPropagation.cpp:73:27:
  error: unused function 'operator<<' [-Werror,-Wunused-function]

  mlir/lib/Dialect/Mesh/Transforms/ShardingPropagation.cpp:97:27:
  error: unused function 'operator<<' [-Werror,-Wunused-function]

Added: 
    

Modified: 
    mlir/lib/Dialect/Mesh/Transforms/ShardingPropagation.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Mesh/Transforms/ShardingPropagation.cpp b/mlir/lib/Dialect/Mesh/Transforms/ShardingPropagation.cpp
index 58a956beb41cb..870ac4a168082 100644
--- a/mlir/lib/Dialect/Mesh/Transforms/ShardingPropagation.cpp
+++ b/mlir/lib/Dialect/Mesh/Transforms/ShardingPropagation.cpp
@@ -70,8 +70,8 @@ static llvm::raw_ostream &operator<<(llvm::raw_ostream &stream,
   return printRange(stream, vec);
 }
 
-static llvm::raw_ostream &operator<<(llvm::raw_ostream &stream,
-                                     const ShardingOption &v) {
+[[maybe_unused]] static llvm::raw_ostream &operator<<(llvm::raw_ostream &stream,
+                                                      const ShardingOption &v) {
   return stream << "{empty = " << v.empty << ", mesh" << v.mesh
                 << ", shardingArray = " << v.shardingArray << "}";
 }
@@ -94,8 +94,8 @@ static llvm::raw_ostream &operator<<(llvm::raw_ostream &stream,
   return printTuple(stream, t, std::index_sequence_for<Ts...>{});
 }
 
-static llvm::raw_ostream &operator<<(llvm::raw_ostream &stream,
-                                     ReshardingRquirementKind v) {
+[[maybe_unused]] static llvm::raw_ostream &
+operator<<(llvm::raw_ostream &stream, ReshardingRquirementKind v) {
   return stream << static_cast<int>(v);
 }
 


        


More information about the Mlir-commits mailing list