From: Eli Friedman Date: Fri, 20 Nov 2009 05:53:06 +0000 (+0000) Subject: Fix a couple minor memory leaks. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8f1893c2860e119f8719b49e2a97fee71f87733;p=clang Fix a couple minor memory leaks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89450 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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::iterator + I = FunctionInfos.begin(), E = FunctionInfos.end(); + while (I != E) + delete &*I++; + } + delete TheABIInfo; } /// ConvertType - Convert the specified type to its LLVM form.