[llvm-commits] [llvm] r149765 - /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp

Andrew Trick atrick at apple.com
Fri Feb 3 22:07:53 PST 2012


On Feb 3, 2012, at 9:26 PM, Nick Lewycky wrote:
> Author: nicholas
> Date: Fri Feb  3 23:26:17 2012
> New Revision: 149765
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=149765&view=rev
> Log:
> 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.

Thanks for fixing it quickly. PassConfig is supposed to be added to the PassManager. Removing that line was an accidental cut & paste. I'll take care of it in my next checkin. There are many more to come in this area. I'm trying to break the changes into chunks, but it's hard for me to catch everything at the intermediate stages. So thanks for keeping an eye on it.

-Andy



More information about the llvm-commits mailing list