mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Fix a leak!
Andy, in a previous commit you made this into an ImmutablePass so that you could add it to the PassManager, then in the next commit you left it a Pass but removed the code that added it to the PM. If you do add it to the PM then the PM should take care of deleting it, but it's also true that nothing in codegen needs this object to exist after it's done its work here. It's not clear to me which design you want; this should likely either cease to be a Pass or be added to the PM where other parts of CodeGen will request it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149765 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3b1088a2cc
commit
c0dc1b7f97
@ -145,6 +145,8 @@ static MCContext *addPassesToGenerateCode(LLVMTargetMachine *TM,
|
||||
|
||||
PassConfig->addMachinePasses();
|
||||
|
||||
delete PassConfig;
|
||||
|
||||
return Context;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user