From c11cb6914d8fc28b4d4dc53843c4f426da9db159 Mon Sep 17 00:00:00 2001 From: Dylan Noblesmith Date: Mon, 25 Aug 2014 00:28:27 +0000 Subject: [PATCH] IR: remove dead code This was added in r134994, to fix a memory leak; three days later, r135248 switched ContainedTys from being new-allocated to being allocated via BumpPtrAllocator, and the earlier fix was never reverted. The destructor doesn't seem to ever actually be called on Types anyway, so it's harmless, but if it were, this'd be an invalid pointer. This reverts r134994. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216354 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/DerivedTypes.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/llvm/IR/DerivedTypes.h b/include/llvm/IR/DerivedTypes.h index 5ec03baf77c..bad3beba493 100644 --- a/include/llvm/IR/DerivedTypes.h +++ b/include/llvm/IR/DerivedTypes.h @@ -204,9 +204,6 @@ class StructType : public CompositeType { /// void *SymbolTableEntry; public: - ~StructType() { - delete [] ContainedTys; // Delete the body. - } /// StructType::create - This creates an identified struct. static StructType *create(LLVMContext &Context, StringRef Name); -- 2.40.0