diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -104,28 +104,37 @@ /// Return the operation that this refers to. Operation *getOperation() { return state; } + // clang-format off + /// Return the dialect that this refers to. + [[deprecated("Use Operation:: instead (replace '.' with '->').")]] Dialect *getDialect() { return getOperation()->getDialect(); } /// Return the parent Region of this operation. + [[deprecated("Use Operation:: instead (replace '.' with '->').")]] Region *getParentRegion() { return getOperation()->getParentRegion(); } /// Returns the closest surrounding operation that contains this operation /// or nullptr if this is a top-level operation. + [[deprecated("Use Operation:: instead (replace '.' with '->').")]] Operation *getParentOp() { return getOperation()->getParentOp(); } /// Return the closest surrounding parent operation that is of type 'OpTy'. template + [[deprecated("Use Operation:: instead (replace '.' with '->').")]] OpTy getParentOfType() { return getOperation()->getParentOfType(); } /// Returns the closest surrounding parent operation with trait `Trait`. template