From 7f412c77a2d4e4afe4618719b2667727aa3c4ca9 Mon Sep 17 00:00:00 2001 From: Filip Hazubski Date: Mon, 9 Dec 2024 22:07:28 +0000 Subject: [PATCH] fix: Explicitly delete unused functions Explicitly delete unused functions of CheckIfExitCalled and VfManagementHandleContext. Comply with the rule of five. Signed-off-by: Filip Hazubski --- .../tools/source/sysman/vf_management/vf_management.h | 4 ++++ opencl/source/tracing/tracing_notify.h | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/level_zero/tools/source/sysman/vf_management/vf_management.h b/level_zero/tools/source/sysman/vf_management/vf_management.h index 162b920ff3..701d12c2ba 100644 --- a/level_zero/tools/source/sysman/vf_management/vf_management.h +++ b/level_zero/tools/source/sysman/vf_management/vf_management.h @@ -34,6 +34,10 @@ class VfManagement : _zes_vf_handle_t { struct VfManagementHandleContext { VfManagementHandleContext(OsSysman *pOsSysman) : pOsSysman(pOsSysman){}; ~VfManagementHandleContext(); + VfManagementHandleContext(VfManagementHandleContext &&other) noexcept = delete; + VfManagementHandleContext(const VfManagementHandleContext &other) = delete; + VfManagementHandleContext &operator=(VfManagementHandleContext &&other) noexcept = delete; + VfManagementHandleContext &operator=(const VfManagementHandleContext &other) = delete; ze_result_t init(); diff --git a/opencl/source/tracing/tracing_notify.h b/opencl/source/tracing/tracing_notify.h index 34e324aadb..b103d8eab7 100644 --- a/opencl/source/tracing/tracing_notify.h +++ b/opencl/source/tracing/tracing_notify.h @@ -7,7 +7,6 @@ #pragma once -#include "shared/source/helpers/non_copyable_or_moveable.h" #include "shared/source/utilities/cpuintrinsics.h" #include "opencl/source/tracing/tracing_handle.h" @@ -30,11 +29,17 @@ namespace HostSideTracing { inline thread_local bool tracingInProgress = false; -class CheckIfExitCalled : public NEO::NonCopyableOrMovableClass { +class CheckIfExitCalled { public: + CheckIfExitCalled() = default; ~CheckIfExitCalled() { UNRECOVERABLE_IF(!tracingExited); } + CheckIfExitCalled(CheckIfExitCalled &&other) noexcept = delete; + CheckIfExitCalled(const CheckIfExitCalled &other) = delete; + CheckIfExitCalled &operator=(CheckIfExitCalled &&other) noexcept = delete; + CheckIfExitCalled &operator=(const CheckIfExitCalled &other) = delete; + void exit() { tracingExited = true; }