diff options
author | Maksim Levental <maksim.levental@gmail.com> | 2025-05-23 06:23:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-23 07:23:53 -0400 |
commit | 617913150a0965ac2d549a569c0ce6ed14a05aed (patch) | |
tree | 54ce2ee4c8230291c6506b7b437d1879fc8f723c /llvm/lib/Object | |
parent | 6db8490f0361b08462ce0c2b592120a36626ec07 (diff) | |
download | llvm-617913150a0965ac2d549a569c0ce6ed14a05aed.zip llvm-617913150a0965ac2d549a569c0ce6ed14a05aed.tar.gz llvm-617913150a0965ac2d549a569c0ce6ed14a05aed.tar.bz2 |
[mlir] explicitly delete copy ctor for DialectRegistry and OperationState (#140963)
Both of these classes have fields involving `unique_ptr`s and thus can't
be copied.
Holding a unique_ptr should trigger implicit deletion of the
copy/assignment constructors, however
not when held through a container:
```
struct Foo {
explicit Foo();
std::vector<std::unique_ptr<Bar>> ptr; // Does not implicitly delete its cpy/assign ctors
};
```
This results in a complicated diagnostics when attempting to copy such a
class (it'll point to the
inner implementation of the container), instead of a nicer error message
about `Foo` not being able
to be copied/assigned. Explicitly deleting the ctors provides an
immediate diagnostic about the issue.
Fixes https://github.com/llvm/llvm-project/issues/118388
Diffstat (limited to 'llvm/lib/Object')
0 files changed, 0 insertions, 0 deletions