IR: remove dead code
authorDylan Noblesmith <nobled@dreamwidth.org>
Mon, 25 Aug 2014 00:28:27 +0000 (00:28 +0000)
committerDylan Noblesmith <nobled@dreamwidth.org>
Mon, 25 Aug 2014 00:28:27 +0000 (00:28 +0000)
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

index 5ec03baf77cf07f188bc1a681b6526bdee74972d..bad3beba4936be6d57021a8a0f394c7c040a2fda 100644 (file)
@@ -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);