[llvm] r227625 - Fix memory leak in WinEHPrepare introduced in r227405.
Alexey Samsonov
vonosmas at gmail.com
Fri Jan 30 14:07:05 PST 2015
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.
More information about the llvm-commits
mailing list