[llvm] 5265ff2 - [VLIWMachineScheduler] Disable default copy ctor and copy assignment operator for VLIWSchedBoundary

Bing1 Yu via llvm-commits llvm-commits at lists.llvm.org
Tue May 30 23:14:29 PDT 2023


Author: Bing1 Yu
Date: 2023-05-31T14:14:20+08:00
New Revision: 5265ff253a87a229a01e88e467860d7f8ae6b2a0

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

LOG: [VLIWMachineScheduler] Disable default copy ctor and copy assignment operator for VLIWSchedBoundary

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

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/VLIWMachineScheduler.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/VLIWMachineScheduler.h b/llvm/include/llvm/CodeGen/VLIWMachineScheduler.h
index a39f04f6db6c..50c88067bd1b 100644
--- a/llvm/include/llvm/CodeGen/VLIWMachineScheduler.h
+++ b/llvm/include/llvm/CodeGen/VLIWMachineScheduler.h
@@ -151,6 +151,8 @@ class ConvergingVLIWScheduler : public MachineSchedStrategy {
           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;


        


More information about the llvm-commits mailing list