This fixes the leak described in http://llvm.org/bugs/show_bug.cgi?id=18318
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/CodeGen/CGException.cpp | ||
---|---|---|
1247–1248 | This should really be a method on the EHCatchScope object. I would call it 'clearHandlerBlocks()'. I would also add a FIXME comment to that function which suggests switching EHCatchScope to *always* clear the blocks on destruction, and to add a 'takeHandler' or some such function which removes ownership from the EHCatchScope. Not asking that you make this change because of the innards of EHCatchScope I expect this change would be somewhat invasive and awkward to do. |
This should really be a method on the EHCatchScope object. I would call it 'clearHandlerBlocks()'.
I would also add a FIXME comment to that function which suggests switching EHCatchScope to *always* clear the blocks on destruction, and to add a 'takeHandler' or some such function which removes ownership from the EHCatchScope. Not asking that you make this change because of the innards of EHCatchScope I expect this change would be somewhat invasive and awkward to do.