diff options
author | Chris Lattner <sabre@nondot.org> | 2002-08-17 22:40:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-08-17 22:40:03 +0000 |
commit | 374a0950cc936b746f40693a1ca1a607f7bbc56e (patch) | |
tree | 522331da753d3ac213f521fb6fa88dd1a5d4ef6b /tools/gccas/gccas.cpp | |
parent | 0e4ca08843f8bacb893f09cecb1a8c750b443106 (diff) | |
download | external_llvm-374a0950cc936b746f40693a1ca1a607f7bbc56e.zip external_llvm-374a0950cc936b746f40693a1ca1a607f7bbc56e.tar.gz external_llvm-374a0950cc936b746f40693a1ca1a607f7bbc56e.tar.bz2 |
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/gccas/gccas.cpp')
-rw-r--r-- | tools/gccas/gccas.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp index 215f5e9..a5ceace 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 } } |