diff --git a/mlir/include/mlir/IR/Attributes.h b/mlir/include/mlir/IR/Attributes.h index cc0cee6a31183..9d5cc36a32718 100644 --- a/mlir/include/mlir/IR/Attributes.h +++ b/mlir/include/mlir/IR/Attributes.h @@ -409,7 +409,7 @@ struct CastInfo) { diff --git a/mlir/include/mlir/IR/Types.h b/mlir/include/mlir/IR/Types.h index 46bb733101c12..f865d29de44be 100644 --- a/mlir/include/mlir/IR/Types.h +++ b/mlir/include/mlir/IR/Types.h @@ -402,7 +402,7 @@ struct CastInfo< /// ID. This means that T::classof would end up comparing the static TypeID of /// the children to the static TypeID of its parent, making it impossible to /// downcast from the parent to the child. - static inline bool isPossible(mlir::Type ty) { + static inline bool isPossible([[maybe_unused]] mlir::Type ty) { /// Return a constant true instead of a dynamic true when casting to self or /// up the hierarchy. if constexpr (std::is_base_of_v) { diff --git a/mlir/include/mlir/IR/Value.h b/mlir/include/mlir/IR/Value.h index a74d0faa1dfc4..d97a58578d482 100644 --- a/mlir/include/mlir/IR/Value.h +++ b/mlir/include/mlir/IR/Value.h @@ -603,7 +603,7 @@ struct CastInfo< /// that returns the dynamic type. This means that T::classof would end up /// comparing the static Kind of the children to the static Kind of its /// parent, making it impossible to downcast from the parent to the child. - static inline bool isPossible(mlir::Value ty) { + static inline bool isPossible([[maybe_unused]] mlir::Value ty) { /// Return a constant true instead of a dynamic true when casting to self or /// up the hierarchy. if constexpr (std::is_base_of_v) {