Delete StructType bodies when destroying a StructType.

Leak found by valgrind.

llvm-svn: 134994
This commit is contained in:
Benjamin Kramer 2011-07-12 18:22:07 +00:00
parent 7e6bfb4a0d
commit 660e29828b
1 changed files with 4 additions and 0 deletions

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.