[llvm] f3d6464 - [MC] Temporarily remove the deleted constructors, they break C++20 build

Ilya Biryukov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 02:40:51 PST 2023


Author: Ilya Biryukov
Date: 2023-01-24T11:40:31+01:00
New Revision: f3d64644d8d75f9317421fe5b9b0f2d030a1a63f

URL: https://github.com/llvm/llvm-project/commit/f3d64644d8d75f9317421fe5b9b0f2d030a1a63f
DIFF: https://github.com/llvm/llvm-project/commit/f3d64644d8d75f9317421fe5b9b0f2d030a1a63f.diff

LOG: [MC] Temporarily remove the deleted constructors, they break C++20 build

This helps to unblock our internal integrate that now relies on C++20
configuration. I will follow up with a proposal to re-enable the deleted
constructors soon, but it is a bit involved to avoid increasing the
sizes of struct.

Added: 
    

Modified: 
    llvm/include/llvm/MC/MCInstrDesc.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/MC/MCInstrDesc.h b/llvm/include/llvm/MC/MCInstrDesc.h
index 15b0a69f8bd65..3bba10501b68d 100644
--- a/llvm/include/llvm/MC/MCInstrDesc.h
+++ b/llvm/include/llvm/MC/MCInstrDesc.h
@@ -197,13 +197,10 @@ enum Flag {
 /// directly to describe itself.
 class MCInstrDesc {
 public:
+  // FIXME: Disable copies and moves.
   // Do not allow MCInstrDescs to be copied or moved. They should only exist in
   // the <Target>Insts table because they rely on knowing their own address to
   // find other information elsewhere in the same table.
-  MCInstrDesc(const MCInstrDesc &) = delete;
-  MCInstrDesc(MCInstrDesc &&) = delete;
-  MCInstrDesc &operator=(const MCInstrDesc &) = delete;
-  MCInstrDesc &operator=(MCInstrDesc &&) = delete;
 
   unsigned short Opcode;         // The opcode number
   unsigned short NumOperands;    // Num of args (may be more if variable_ops)


        


More information about the llvm-commits mailing list