Skip to content

Commit fa354af

Browse files
fixup! [mlir] Apply rule of five for Pass / OperationPass
Mark move ctor/assignment-operator as deleted as member field (PassOptions) is non-movable
1 parent f9a93d3 commit fa354af

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mlir/include/mlir/Pass/Pass.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ class Pass {
166166
this->opName = other.opName;
167167
return *this;
168168
}
169-
Pass(Pass &&) = default;
170-
Pass &operator=(Pass &&) = default;
169+
Pass(Pass &&) = delete;
170+
Pass &operator=(Pass &&) = delete;
171171

172172
/// Returns the current pass state.
173173
detail::PassExecutionState &getPassState() {
@@ -360,8 +360,8 @@ class OperationPass : public Pass {
360360
OperationPass(TypeID passID) : Pass(passID, OpT::getOperationName()) {}
361361
OperationPass(const OperationPass &) = default;
362362
OperationPass &operator=(const OperationPass &) = default;
363-
OperationPass(OperationPass &&) = default;
364-
OperationPass &operator=(OperationPass &&) = default;
363+
OperationPass(OperationPass &&) = delete;
364+
OperationPass &operator=(OperationPass &&) = delete;
365365

366366
/// Support isa/dyn_cast functionality.
367367
static bool classof(const Pass *pass) {
@@ -402,8 +402,8 @@ class OperationPass<void> : public Pass {
402402
OperationPass(TypeID passID) : Pass(passID) {}
403403
OperationPass(const OperationPass &) = default;
404404
OperationPass &operator=(const OperationPass &) = default;
405-
OperationPass(OperationPass &&) = default;
406-
OperationPass &operator=(OperationPass &&) = default;
405+
OperationPass(OperationPass &&) = delete;
406+
OperationPass &operator=(OperationPass &&) = delete;
407407

408408
/// Indicate if the current pass can be scheduled on the given operation type.
409409
/// By default, generic operation passes can be scheduled on any operation.

0 commit comments

Comments
 (0)