summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-01-30 22:07:05 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-01-30 22:07:05 +0000
commit964f4dbaae604b222f18cfeec8f222c712a7731a (patch)
treecfbc3de0c1e8b711f8f5f54d20e2a98dda9476f4
parentb1874ebd32e60fa636f541571608975293cab27e (diff)
downloadbcm5719-llvm-964f4dbaae604b222f18cfeec8f222c712a7731a.tar.gz
bcm5719-llvm-964f4dbaae604b222f18cfeec8f222c712a7731a.zip
Fix memory leak in WinEHPrepare introduced in r227405.
This leak was detected by ASan bootstrap of LLVM. llvm-svn: 227625
-rw-r--r--llvm/lib/CodeGen/WinEHPrepare.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp
index 52bca672480..c608bb0a31e 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 <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.
OpenPOWER on IntegriCloud