diff options
author | Torok Edwin <edwintorok@gmail.com> | 2008-05-03 20:25:26 +0000 |
---|---|---|
committer | Torok Edwin <edwintorok@gmail.com> | 2008-05-03 20:25:26 +0000 |
commit | 2a45575c718f76088e133989b1b87fe558bf7fd0 (patch) | |
tree | b61915d0571bfdf94e2d11866fbca6ad5a9536f0 | |
parent | fa0e3c4a928fef3ddefa586e35d87ad3471e7d72 (diff) | |
download | bcm5719-llvm-2a45575c718f76088e133989b1b87fe558bf7fd0.tar.gz bcm5719-llvm-2a45575c718f76088e133989b1b87fe558bf7fd0.zip |
Implement destructor for PostDominatorTree to eliminate a memory leak.
llvm-svn: 50607
-rw-r--r-- | llvm/include/llvm/Analysis/PostDominators.h | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/PostDominators.cpp | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/PostDominators.h b/llvm/include/llvm/Analysis/PostDominators.h index 07910e9538c..27c2b26c8c2 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<BasicBlock>(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 4330e9039d1..c72b140a622 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 //===----------------------------------------------------------------------===// |