[llvm] r189167 - DwarfDebug: Delete orphaned children.
David Blaikie
dblaikie at gmail.com
Sun Aug 25 10:43:01 PDT 2013
On Aug 24, 2013 4:59 AM, "Benjamin Kramer" <benny.kra at googlemail.com> wrote:
>
> Author: d0k
> Date: Sat Aug 24 06:55:49 2013
> New Revision: 189167
>
> URL: http://llvm.org/viewvc/llvm-project?rev=189167&view=rev
> Log:
> DwarfDebug: Delete orphaned children.
Thanks Ben
>
> Leak found by valgrind.
Was this showing up on any buildbots we should've been paying attention to?
>
> Modified:
> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=189167&r1=189166&r2=189167&view=diff
>
==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sat Aug 24 06:55:49
2013
> @@ -639,7 +639,10 @@ DIE *DwarfDebug::constructScopeDIE(Compi
> constructImportedEntityDIE(TheCU, i->second, ScopeDIE);
> }
>
> - if (!ScopeDIE) return NULL;
> + if (!ScopeDIE) {
> + std::for_each(Children.begin(), Children.end(), deleter<DIE>);
> + return NULL;
> + }
>
> // Add children
> for (SmallVectorImpl<DIE *>::iterator I = Children.begin(),
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130825/e03b555f/attachment.html>
More information about the llvm-commits
mailing list