projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc89561
)
Delete StructType bodies when destroying a StructType.
author
Benjamin Kramer
<benny.kra@googlemail.com>
Tue, 12 Jul 2011 18:22:07 +0000
(18:22 +0000)
committer
Benjamin Kramer
<benny.kra@googlemail.com>
Tue, 12 Jul 2011 18:22:07 +0000
(18:22 +0000)
Leak found by valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134994
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/DerivedTypes.h
patch
|
blob
|
history
diff --git
a/include/llvm/DerivedTypes.h
b/include/llvm/DerivedTypes.h
index 0f1e99f13499b9b64b9f905f1ee146eb9d1bdd24..acb28deada10aa9fa2365037b95d50ac2d315c1a 100644
(file)
--- a/
include/llvm/DerivedTypes.h
+++ b/
include/llvm/DerivedTypes.h
@@
-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.