This is an archive of the discontinued LLVM Phabricator instance.

[objc] Fix memory leak in CGObjCMac.cpp
AbandonedPublic

Authored by rjmccall on Sep 29 2020, 8:39 AM.

Details

Summary

A memory leak was introduced in https://reviews.llvm.org/D88329

CGObjCMac.cpp was leaking a MangleContext everytime it mangled
an ObjC method. We now have an instance variable that allocates
and deallocates the context.

Diff Detail

Event Timeline

ellis created this revision.Sep 29 2020, 8:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 29 2020, 8:39 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
ellis requested review of this revision.Sep 29 2020, 8:39 AM
rjmccall accepted this revision.Sep 29 2020, 9:57 AM

Oh, oops, I should've caught this in review. I assume you still need a commit?

This revision is now accepted and ready to land.Sep 29 2020, 9:57 AM
ellis added a comment.Sep 29 2020, 9:59 AM

Yes please commit for me :)

ellis updated this revision to Diff 295055.Sep 29 2020, 11:01 AM
ellis added a subscriber: vsapsai.

Fix a comment to reference the correct method.

Thanks to @vsapsai for pointing this out.

Herald added a project: Restricted Project. · View Herald Transcript

Thanks for updating the comment in dsymutil!

rjmccall commandeered this revision.Sep 29 2020, 4:52 PM
rjmccall edited reviewers, added: ellis; removed: rjmccall.
This revision now requires review to proceed.Sep 29 2020, 4:52 PM

Committed (with substantial changes) as 984744a1314ce165378e7945bc45995302a8cb80

rjmccall abandoned this revision.Sep 29 2020, 4:53 PM