This is an archive of the discontinued LLVM Phabricator instance.

Fix leak in lib/CodeGen/CGException.cpp, PR18318
ClosedPublic

Authored by kcc on Dec 25 2013, 11:58 PM.

Diff Detail

Event Timeline

chandlerc added inline comments.Dec 26 2013, 1:03 AM
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.

kcc updated this revision to Unknown Object (????).Dec 26 2013, 1:19 AM

PTAL
Introduced EHCatchScope::clearHandlerBlocks

kcc closed this revision.Jan 9 2014, 1:28 AM