[llvm] [NFC][Target][MC] Fixed rule-of-three for MCFragment/Archive/RegisterTargetPassConfigCallback classes (PR #193470)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 22 08:41:47 PDT 2026
================
@@ -339,6 +339,7 @@ class LLVM_ABI Archive : public Binary {
// Explicitly non-copyable.
Archive(Archive const &) = delete;
Archive &operator=(Archive const &) = delete;
+ ~Archive() = default;
----------------
jh7370 wrote:
I don't think this is "rule of three" territory: that covers classes where a _user-defined_ destructor/copy-constructor/copy-assignment operator exists. However, here we are deleting the copy constructor and copy assignment methods. They aren't user-defined (and if they were, the chances are that defaulting the destructor isn't correct).
See also https://discourse.llvm.org/t/rfc-enforce-rule-of-three/89874.
What makes you think that rule of three applies here?
https://github.com/llvm/llvm-project/pull/193470
More information about the llvm-commits
mailing list