[Openmp-commits] [openmp] ba93e4e - [OpenMP][NFC] Add missing virtual destructor to silence warning

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 28 20:34:16 PDT 2022


Author: Johannes Doerfert
Date: 2022-03-28T22:33:18-05:00
New Revision: ba93e4e33ead8aaa20e762211facaf3fa7e1439f

URL: https://github.com/llvm/llvm-project/commit/ba93e4e33ead8aaa20e762211facaf3fa7e1439f
DIFF: https://github.com/llvm/llvm-project/commit/ba93e4e33ead8aaa20e762211facaf3fa7e1439f.diff

LOG: [OpenMP][NFC] Add missing virtual destructor to silence warning

Added: 
    

Modified: 
    openmp/libomptarget/plugins/cuda/src/rtl.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins/cuda/src/rtl.cpp b/openmp/libomptarget/plugins/cuda/src/rtl.cpp
index 8bfac149cb83d..f34d9079d1b80 100644
--- a/openmp/libomptarget/plugins/cuda/src/rtl.cpp
+++ b/openmp/libomptarget/plugins/cuda/src/rtl.cpp
@@ -168,6 +168,8 @@ struct DeviceDataTy {
 /// accordingly. The implementation should not raise any exception.
 template <typename T> struct AllocatorTy {
   using ElementTy = T;
+  virtual ~AllocatorTy() {}
+
   /// Create a resource and assign to R.
   virtual int create(T &R) noexcept = 0;
   /// Destroy the resource.


        


More information about the Openmp-commits mailing list