Delete StructType bodies when destroying a StructType.

Leak found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134994 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2011-07-12 18:22:07 +00:00
parent dc89561fec
commit a1f17f8395

View File

@ -190,6 +190,10 @@ class StructType : public CompositeType {
///
void *SymbolTableEntry;
public:
~StructType() {
delete [] ContainedTys; // Delete the body.
}
/// StructType::createNamed - This creates a named struct with no body
/// specified. If the name is empty, it creates an unnamed struct, which has
/// a unique identity but no actual name.