[llvm] r227625 - Fix memory leak in WinEHPrepare introduced in r227405.

Reid Kleckner rnk at google.com
Fri Jan 30 14:36:09 PST 2015


Thanks, I went to commit the fix and got the conflict. :)

On Fri, Jan 30, 2015 at 2:07 PM, Alexey Samsonov <vonosmas at gmail.com> wrote:

> Author: samsonov
> Date: Fri Jan 30 16:07:05 2015
> New Revision: 227625
>
> URL: http://llvm.org/viewvc/llvm-project?rev=227625&view=rev
> Log:
> Fix memory leak in WinEHPrepare introduced in r227405.
>
> This leak was detected by ASan bootstrap of LLVM.
>
> 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=227625&r1=227624&r2=227625&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/WinEHPrepare.cpp (original)
> +++ llvm/trunk/lib/CodeGen/WinEHPrepare.cpp Fri Jan 30 16:07:05 2015
> @@ -20,13 +20,15 @@
>  #include "llvm/IR/IRBuilder.h"
>  #include "llvm/IR/Instructions.h"
>  #include "llvm/Pass.h"
> +#include <memory>
> +
>  using namespace llvm;
>
>  #define DEBUG_TYPE "winehprepare"
>
>  namespace {
>  class WinEHPrepare : public FunctionPass {
> -  FunctionPass *DwarfPrepare;
> +  std::unique_ptr<FunctionPass> DwarfPrepare;
>
>  public:
>    static char ID; // Pass identification, replacement for typeid.
>
>
> _______________________________________________
> 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/20150130/8a492ae7/attachment.html>


More information about the llvm-commits mailing list