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 | dded107d64022075e7dcd54ea952bbda41fb8b2e (patch) | |
tree | 42d68312d6b95a0376829d8d5d7d14dcbb5a2140 /llvm/tools/gccas | |
parent | 325c1ce8f3c4c324998d82decef9b6c01d9752a7 (diff) | |
download | bcm5719-llvm-dded107d64022075e7dcd54ea952bbda41fb8b2e.tar.gz bcm5719-llvm-dded107d64022075e7dcd54ea952bbda41fb8b2e.zip |
Do not leak memory for passes when using -stopAfterNPasses or -stopraise
llvm-svn: 3371
Diffstat (limited to 'llvm/tools/gccas')
-rw-r--r-- | llvm/tools/gccas/gccas.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/tools/gccas/gccas.cpp b/llvm/tools/gccas/gccas.cpp index 215f5e9bba6..a5ceace4456 100644 --- a/llvm/tools/gccas/gccas.cpp +++ b/llvm/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 } } |