[cfe-commits] r89450 - /cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
Daniel Dunbar
daniel at zuster.org
Sat Nov 21 21:01:10 PST 2009
On Thu, Nov 19, 2009 at 9:53 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> Author: efriedma
> Date: Thu Nov 19 23:53:06 2009
> New Revision: 89450
>
> URL: http://llvm.org/viewvc/llvm-project?rev=89450&view=rev
> Log:
> Fix a couple minor memory leaks.
>
>
> Modified:
> cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=89450&r1=89449&r2=89450&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Thu Nov 19 23:53:06 2009
> @@ -38,7 +38,13 @@
> 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++;
> + }
This isn't invalidating the infos, it could be a standard for loop?
- Daniel
> + delete TheABIInfo;
> }
>
> /// ConvertType - Convert the specified type to its LLVM form.
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
More information about the cfe-commits
mailing list