[llvm] r234059 - Fixing a memory leak in WinEHPrepare

David Blaikie dblaikie at gmail.com
Fri Apr 3 15:03:37 PDT 2015


On Fri, Apr 3, 2015 at 2:44 PM, Andrew Kaylor <andrew.kaylor at intel.com>
wrote:

> Author: akaylor
> Date: Fri Apr  3 16:44:17 2015
> New Revision: 234059
>
> URL: http://llvm.org/viewvc/llvm-project?rev=234059&view=rev
> Log:
> Fixing a memory leak in WinEHPrepare
>
> Modified:
>     llvm/trunk/lib/CodeGen/WinEHPrepare.cpp
>
> Modified: llvm/trunk/lib/CodeGen/WinEHPrepare.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/WinEHPrepare.cpp?rev=234059&r1=234058&r2=234059&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/WinEHPrepare.cpp (original)
> +++ llvm/trunk/lib/CodeGen/WinEHPrepare.cpp Fri Apr  3 16:44:17 2015
> @@ -733,6 +733,8 @@ void WinEHPrepare::completeNestedLanding
>        ActionTargets.push_back(NewBA);
>      }
>    }
> +  DeleteContainerPointers(ActionList);
>

I've been (vaguely) trying to remove uses of DeleteContainer* functions in
favor of unique_ptr - could we change ActionList to be a
SmallVector<unique_ptr<ActiovHandler>> instead of raw pointers?


> +  ActionList.clear();
>    OutlinedBB->getInstList().push_back(EHActions);
>
>    // Insert an indirect branch into the outlined landing pad BB.
>
>
> _______________________________________________
> 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/20150403/61428c9e/attachment.html>


More information about the llvm-commits mailing list