diff --git a/mlir/include/mlir/IR/PatternMatch.h b/mlir/include/mlir/IR/PatternMatch.h index 7b0b9cef9c5bd..576481a6e7215 100644 --- a/mlir/include/mlir/IR/PatternMatch.h +++ b/mlir/include/mlir/IR/PatternMatch.h @@ -312,6 +312,9 @@ struct OpOrInterfaceRewritePatternBase : public RewritePattern { template struct OpRewritePattern : public mlir::detail::OpOrInterfaceRewritePatternBase { + /// Type alias to allow derived classes to inherit constructors with + /// `using Base::Base;`. + using Base = OpRewritePattern; /// Patterns must specify the root operation name they match against, and can /// also specify the benefit of the pattern matching and a list of generated @@ -328,6 +331,9 @@ struct OpRewritePattern template struct OpInterfaceRewritePattern : public mlir::detail::OpOrInterfaceRewritePatternBase { + /// Type alias to allow derived classes to inherit constructors with + /// `using Base::Base;`. + using Base = OpInterfaceRewritePattern; OpInterfaceRewritePattern(MLIRContext *context, PatternBenefit benefit = 1) : mlir::detail::OpOrInterfaceRewritePatternBase( @@ -341,6 +347,10 @@ struct OpInterfaceRewritePattern template