[llvm] [NFCI] Explicitly delete unused copy constructor and assign copy for VPInterleavedAccessInfo (PR #134755)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 8 09:14:06 PDT 2025


https://github.com/calebwat updated https://github.com/llvm/llvm-project/pull/134755

>From 384f17b4a898a39ba80c9530c5756d70051afb77 Mon Sep 17 00:00:00 2001
From: "Watts, Caleb" <caleb.watts at intel.com>
Date: Mon, 7 Apr 2025 16:23:14 -0700
Subject: [PATCH] [NFCI] Explicitly delete unused copy constructor and assign
 copy

VPInterleavedAccessInfo has a defined destructor freeing memory, but no explicitly defined copy constructor or copy assignment op. These are not used, so this patch marks them as deleted to avoid usage of the implicitly defined implementations.
---
 llvm/lib/Transforms/Vectorize/VPlanSLP.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/llvm/lib/Transforms/Vectorize/VPlanSLP.h b/llvm/lib/Transforms/Vectorize/VPlanSLP.h
index 93f04e6e30a6f..7f123689170ad 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanSLP.h
+++ b/llvm/lib/Transforms/Vectorize/VPlanSLP.h
@@ -48,6 +48,8 @@ class VPInterleavedAccessInfo {
 
 public:
   VPInterleavedAccessInfo(VPlan &Plan, InterleavedAccessInfo &IAI);
+  VPInterleavedAccessInfo(const VPInterleavedAccessInfo &) = delete;
+  VPInterleavedAccessInfo &operator=(const VPInterleavedAccessInfo &) = delete;
 
   ~VPInterleavedAccessInfo() {
     // Avoid releasing a pointer twice.



More information about the llvm-commits mailing list