From: Alexey Samsonov Date: Fri, 30 Jan 2015 22:07:05 +0000 (+0000) Subject: Fix memory leak in WinEHPrepare introduced in r227405. X-Git-Tag: llvmorg-3.7.0-rc1~13566 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=964f4dbaae604b222f18cfeec8f222c712a7731a;p=platform%2Fupstream%2Fllvm.git Fix memory leak in WinEHPrepare introduced in r227405. This leak was detected by ASan bootstrap of LLVM. llvm-svn: 227625 --- diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp index 52bca67..c608bb0 100644 --- a/llvm/lib/CodeGen/WinEHPrepare.cpp +++ b/llvm/lib/CodeGen/WinEHPrepare.cpp @@ -20,13 +20,15 @@ #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Instructions.h" #include "llvm/Pass.h" +#include + using namespace llvm; #define DEBUG_TYPE "winehprepare" namespace { class WinEHPrepare : public FunctionPass { - FunctionPass *DwarfPrepare; + std::unique_ptr DwarfPrepare; public: static char ID; // Pass identification, replacement for typeid.