summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mlir/include/mlir/IR/Attributes.h7
-rw-r--r--mlir/include/mlir/IR/Types.h7
2 files changed, 4 insertions, 10 deletions
diff --git a/mlir/include/mlir/IR/Attributes.h b/mlir/include/mlir/IR/Attributes.h
index 94aea9464b1..b5f4b1a7d7c 100644
--- a/mlir/include/mlir/IR/Attributes.h
+++ b/mlir/include/mlir/IR/Attributes.h
@@ -82,11 +82,8 @@ public:
/* implicit */ Attribute(const ImplType *impl)
: impl(const_cast<ImplType *>(impl)) {}
- Attribute(const Attribute &other) : impl(other.impl) {}
- Attribute &operator=(Attribute other) {
- impl = other.impl;
- return *this;
- }
+ Attribute(const Attribute &other) = default;
+ Attribute &operator=(const Attribute &other) = default;
bool operator==(Attribute other) const { return impl == other.impl; }
bool operator!=(Attribute other) const { return !(*this == other); }
diff --git a/mlir/include/mlir/IR/Types.h b/mlir/include/mlir/IR/Types.h
index 11af3eb1e66..2ab36353dc4 100644
--- a/mlir/include/mlir/IR/Types.h
+++ b/mlir/include/mlir/IR/Types.h
@@ -121,11 +121,8 @@ public:
/* implicit */ Type(const ImplType *impl)
: impl(const_cast<ImplType *>(impl)) {}
- Type(const Type &other) : impl(other.impl) {}
- Type &operator=(Type other) {
- impl = other.impl;
- return *this;
- }
+ Type(const Type &other) = default;
+ Type &operator=(const Type &other) = default;
bool operator==(Type other) const { return impl == other.impl; }
bool operator!=(Type other) const { return !(*this == other); }
OpenPOWER on IntegriCloud