summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-08-17 22:40:03 +0000
committerChris Lattner <sabre@nondot.org>2002-08-17 22:40:03 +0000
commit374a0950cc936b746f40693a1ca1a607f7bbc56e (patch)
tree522331da753d3ac213f521fb6fa88dd1a5d4ef6b /tools
parent0e4ca08843f8bacb893f09cecb1a8c750b443106 (diff)
downloadllvm-374a0950cc936b746f40693a1ca1a607f7bbc56e.tar.gz
llvm-374a0950cc936b746f40693a1ca1a607f7bbc56e.tar.bz2
llvm-374a0950cc936b746f40693a1ca1a607f7bbc56e.tar.xz
Do not leak memory for passes when using -stopAfterNPasses or -stopraise
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/gccas/gccas.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp
index 215f5e9bba..a5ceace445 100644
--- a/tools/gccas/gccas.cpp
+++ b/tools/gccas/gccas.cpp
@@ -58,6 +58,8 @@ static inline void addPass(PassManager &PM, Pass *P) {
// Keep track of how many passes we made for -stopAfterNPasses
++NumPassesCreated;
+ } else {
+ delete P; // We don't want this pass to run, just delete it now
}
}