[llvm] [nfc]Make InstrProfSymtab non-copyable and non-movable (PR #86882)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 18:24:54 PDT 2024


================
@@ -471,6 +471,15 @@ class InstrProfSymtab {
 public:
   InstrProfSymtab() = default;
 
+  // Not copyable or movable.
+  // Consider std::unique_ptr for move.
+  // InstrProfSymtab has a few containers as class members, so consider
+  // std::shared_ptr for read-only copy.
----------------
minglotus-6 wrote:

sounds good! I also hesitated about whether to mention `shared_ptr` and added it mainly for completeness.

https://github.com/llvm/llvm-project/pull/86882


More information about the llvm-commits mailing list