diff --git a/mlir/include/mlir/IR/DialectRegistry.h b/mlir/include/mlir/IR/DialectRegistry.h index d3d53488fe72d..7bcf1eda7c636 100644 --- a/mlir/include/mlir/IR/DialectRegistry.h +++ b/mlir/include/mlir/IR/DialectRegistry.h @@ -143,6 +143,8 @@ class DialectRegistry { public: explicit DialectRegistry(); + DialectRegistry(const DialectRegistry &) = delete; + DialectRegistry &operator=(const DialectRegistry &other) = delete; template void insert() { diff --git a/mlir/include/mlir/IR/OperationSupport.h b/mlir/include/mlir/IR/OperationSupport.h index 2d9fb2bc5859e..0046d977c68f4 100644 --- a/mlir/include/mlir/IR/OperationSupport.h +++ b/mlir/include/mlir/IR/OperationSupport.h @@ -985,9 +985,9 @@ struct OperationState { BlockRange successors = {}, MutableArrayRef> regions = {}); OperationState(OperationState &&other) = default; - OperationState(const OperationState &other) = default; OperationState &operator=(OperationState &&other) = default; - OperationState &operator=(const OperationState &other) = default; + OperationState(const OperationState &other) = delete; + OperationState &operator=(const OperationState &other) = delete; ~OperationState(); /// Get (or create) a properties of the provided type to be set on the