Implement destructor for PostDominatorTree to eliminate a memory leak.

llvm-svn: 50607
This commit is contained in:
Torok Edwin 2008-05-03 20:25:26 +00:00
parent fa0e3c4a92
commit 2a45575c71
2 changed files with 7 additions and 0 deletions

View File

@ -29,6 +29,8 @@ struct PostDominatorTree : public FunctionPass {
DT = new DominatorTreeBase<BasicBlock>(true);
}
~PostDominatorTree();
virtual bool runOnFunction(Function &F);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {

View File

@ -37,6 +37,11 @@ bool PostDominatorTree::runOnFunction(Function &F) {
return false;
}
PostDominatorTree::~PostDominatorTree()
{
delete DT;
}
//===----------------------------------------------------------------------===//
// PostDominanceFrontier Implementation
//===----------------------------------------------------------------------===//