From d9b3a8244a34728e12465d48bf7ad9335d1d2881 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Fri, 30 Jan 2015 22:07:05 +0000 Subject: [PATCH] Fix memory leak in WinEHPrepare introduced in r227405. This leak was detected by ASan bootstrap of LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227625 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/WinEHPrepare.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/WinEHPrepare.cpp b/lib/CodeGen/WinEHPrepare.cpp index 52bca672480..c608bb0a31e 100644 --- a/lib/CodeGen/WinEHPrepare.cpp +++ b/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. -- 2.34.1