diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h index 07910e9538c..27c2b26c8c2 100644 --- a/include/llvm/Analysis/PostDominators.h +++ b/include/llvm/Analysis/PostDominators.h @@ -29,6 +29,8 @@ struct PostDominatorTree : public FunctionPass { DT = new DominatorTreeBase(true); } + ~PostDominatorTree(); + virtual bool runOnFunction(Function &F); virtual void getAnalysisUsage(AnalysisUsage &AU) const { diff --git a/lib/Analysis/PostDominators.cpp b/lib/Analysis/PostDominators.cpp index 4330e9039d1..c72b140a622 100644 --- a/lib/Analysis/PostDominators.cpp +++ b/lib/Analysis/PostDominators.cpp @@ -37,6 +37,11 @@ bool PostDominatorTree::runOnFunction(Function &F) { return false; } +PostDominatorTree::~PostDominatorTree() +{ + delete DT; +} + //===----------------------------------------------------------------------===// // PostDominanceFrontier Implementation //===----------------------------------------------------------------------===//