diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-11-20 05:53:06 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-11-20 05:53:06 +0000 |
commit | f8f1893c2860e119f8719b49e2a97fee71f87733 (patch) | |
tree | 043c06c818fb7a102000409f6998a05544bae07f /lib/CodeGen/CodeGenTypes.cpp | |
parent | 50e837b3cbc9315b6808daabb96c5c7cccf11ea7 (diff) |
Fix a couple minor memory leaks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89450 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenTypes.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index 1f83f37e04..1dd2971446 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -38,7 +38,13 @@ CodeGenTypes::~CodeGenTypes() { I = CGRecordLayouts.begin(), E = CGRecordLayouts.end(); I != E; ++I) delete I->second; - CGRecordLayouts.clear(); + { + llvm::FoldingSet<CGFunctionInfo>::iterator + I = FunctionInfos.begin(), E = FunctionInfos.end(); + while (I != E) + delete &*I++; + } + delete TheABIInfo; } /// ConvertType - Convert the specified type to its LLVM form. |