[PATCH] D151699: [VLIWMachineScheduler] Disable default copy ctor and copy assignment operator for VLIWSchedBoundary
James Nagurne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 30 22:22:08 PDT 2023
JamesNagurne accepted this revision.
JamesNagurne added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/include/llvm/CodeGen/VLIWMachineScheduler.h:155
+ VLIWSchedBoundary &operator=(const VLIWSchedBoundary &other) = delete;
+ VLIWSchedBoundary(const VLIWSchedBoundary &other) = delete;
----------------
yubing wrote:
> JamesNagurne wrote:
> > What is the reasoning here? It's not obvious to me.
> 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.
Understood! Was just curious if there was any other motive. LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151699/new/
https://reviews.llvm.org/D151699
More information about the llvm-commits
mailing list