diff --git a/llvm/include/llvm/Analysis/PostDominators.h b/llvm/include/llvm/Analysis/PostDominators.h index 07910e9538c7..27c2b26c8c2d 100644 --- a/llvm/include/llvm/Analysis/PostDominators.h +++ b/llvm/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/llvm/lib/Analysis/PostDominators.cpp b/llvm/lib/Analysis/PostDominators.cpp index 4330e9039d1a..c72b140a6224 100644 --- a/llvm/lib/Analysis/PostDominators.cpp +++ b/llvm/lib/Analysis/PostDominators.cpp @@ -37,6 +37,11 @@ bool PostDominatorTree::runOnFunction(Function &F) { return false; } +PostDominatorTree::~PostDominatorTree() +{ + delete DT; +} + //===----------------------------------------------------------------------===// // PostDominanceFrontier Implementation //===----------------------------------------------------------------------===//