diff --git a/llvm/include/llvm/CodeGen/ScheduleDAG.h b/llvm/include/llvm/CodeGen/ScheduleDAG.h --- a/llvm/include/llvm/CodeGen/ScheduleDAG.h +++ b/llvm/include/llvm/CodeGen/ScheduleDAG.h @@ -568,6 +568,15 @@ bool StressSched; #endif + // This class is designed to be passed by reference only. Copy constructor + // is declared as deleted here to make the derived classes have deleted + // implicit-declared copy constructor, which suppresses the warnings from + // static analyzer when the derived classes own resources that are freed in + // their destructors, but don't have user-written copy constructors (rule + // of three). + ScheduleDAG(const ScheduleDAG &) = delete; + ScheduleDAG &operator=(const ScheduleDAG &) = delete; + explicit ScheduleDAG(MachineFunction &mf); virtual ~ScheduleDAG();