mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-04 02:18:46 +00:00
Do not leak memory for passes when using -stopAfterNPasses or -stopraise
llvm-svn: 3371
This commit is contained in:
parent
f91e0dc64d
commit
38e64fffd9
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user