[llvm] r216354 - IR: remove dead code

Dylan Noblesmith nobled at dreamwidth.org
Sun Aug 24 17:28:27 PDT 2014


Author: nobled
Date: Sun Aug 24 19:28:27 2014
New Revision: 216354

URL: http://llvm.org/viewvc/llvm-project?rev=216354&view=rev
Log:
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.

Modified:
    llvm/trunk/include/llvm/IR/DerivedTypes.h

Modified: llvm/trunk/include/llvm/IR/DerivedTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DerivedTypes.h?rev=216354&r1=216353&r2=216354&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DerivedTypes.h (original)
+++ llvm/trunk/include/llvm/IR/DerivedTypes.h Sun Aug 24 19:28:27 2014
@@ -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);





More information about the llvm-commits mailing list