diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp index 215f5e9bba6..a5ceace4456 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 } }