[VLIWMachineScheduler] Disable default copy ctor and copy assignment operator for...
authorBing1 Yu <bing1.yu@intel.com>
Wed, 31 May 2023 06:13:48 +0000 (14:13 +0800)
committerBing1 Yu <bing1.yu@intel.com>
Wed, 31 May 2023 06:14:20 +0000 (14:14 +0800)
class VLIWSchedBoundary manages resources such as dynamically allocated memory, it's generally a good practice to either implement a custom copy constructor or disable the default one.

Reviewed By: JamesNagurne

Differential Revision: https://reviews.llvm.org/D151699

llvm/include/llvm/CodeGen/VLIWMachineScheduler.h

index a39f04f..50c8806 100644 (file)
@@ -151,6 +151,8 @@ protected:
           Pending(ID << ConvergingVLIWScheduler::LogMaxQID, Name + ".P") {}
 
     ~VLIWSchedBoundary();
+    VLIWSchedBoundary &operator=(const VLIWSchedBoundary &other) = delete;
+    VLIWSchedBoundary(const VLIWSchedBoundary &other) = delete;
 
     void init(VLIWMachineScheduler *dag, const TargetSchedModel *smodel) {
       DAG = dag;