[Openmp-commits] [openmp] 6c2be88 - Revert "[OpenMP][NFC] Add missing virtual destructor to silence warning"

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Fri Mar 25 14:07:22 PDT 2022


Author: Johannes Doerfert
Date: 2022-03-25T16:07:11-05:00
New Revision: 6c2be885ff1c62991a87858c1948ee0a86c57fa0

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

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

This reverts commit b9fd8f34ae547674ac0b5f5fbc5bb66d2bc0fedb as it
accidentally contained a unit test change that is not finished (and
unrelated).

Added: 
    

Modified: 
    llvm/unittests/Linker/LinkModulesTest.cpp
    openmp/libomptarget/plugins/cuda/src/rtl.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Linker/LinkModulesTest.cpp b/llvm/unittests/Linker/LinkModulesTest.cpp
index 7a1217c8edd32..793c744a2df53 100644
--- a/llvm/unittests/Linker/LinkModulesTest.cpp
+++ b/llvm/unittests/Linker/LinkModulesTest.cpp
@@ -359,27 +359,4 @@ TEST_F(LinkModuleTest, RemangleIntrinsics) {
   ASSERT_EQ(F->getNumUses(), (unsigned)2);
 }
 
-TEST_F(LinkModuleTest, StructTypeReusedMerge) {
-  LLVMContext C;
-  SMDiagnostic Err;
-
-  const char *M1Str = "%t = type {i32}\n"
-                      "%q = type {%t}\n"
-                      "@t1 = weak global %q zeroinitializer\n";
-  std::unique_ptr<Module> M1 = parseAssemblyString(M1Str, Err, C);
-
-  const char *M2Str = "%t = type {i32}\n"
-                      "%q = type {%t}\n"
-                      "@t2 = weak global %q zeroinitializer\n";
-  std::unique_ptr<Module> M2 = parseAssemblyString(M2Str, Err, C);
-
-  Ctx.setDiagnosticHandlerCallBack(expectNoDiags);
-  Linker::linkModules(*M1, std::move(M2));
-
-  EXPECT_EQ(M1->getNamedGlobal("t1")->getType(),
-            M1->getNamedGlobal("t2")->getType());
-  EXPECT_TRUE(llvm::for_each(M1->getIdentifiedStructTypes(), [](const StructType *STy) { return STy->hasName(); }));
-
-}
-
 } // end anonymous namespace

diff  --git a/openmp/libomptarget/plugins/cuda/src/rtl.cpp b/openmp/libomptarget/plugins/cuda/src/rtl.cpp
index e8028855d45d1..0a6d023a7fc08 100644
--- a/openmp/libomptarget/plugins/cuda/src/rtl.cpp
+++ b/openmp/libomptarget/plugins/cuda/src/rtl.cpp
@@ -168,8 +168,6 @@ 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