This is an archive of the discontinued LLVM Phabricator instance.

[libc++/abi] Re-remove unnecessary null pointer checks from operator delete
ClosedPublic

Authored by ldionne on Dec 17 2020, 10:32 AM.

Details

Reviewers
MaskRay
Group Reviewers
Restricted Project
Restricted Project
Commits
rGbc556e5685c0: [libc++/abi] Re-remove unnecessary null pointer checks from operator delete
Summary

In 7cd67904f776, we removed the unnecessary nullptr checks from the libc++abi
definition of operator delete, but we forgot to update the definition in
libc++ (damn code duplication!). Then, in d4a1e03c5fb5, I synced the
definitions across libc++ and libc++abi, but I did it the wrong way around.
I re-added the if() checks to libc++abi instead of removing them from libc++.

In ef74f0fdc339, we re-removed the if() check from operator delete, but
only in libc++abi. This patch corrects this mess and removes it
consistently in libc++ and libc++abi.

Diff Detail

Event Timeline

ldionne created this revision.Dec 17 2020, 10:32 AM
ldionne requested review of this revision.Dec 17 2020, 10:32 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 17 2020, 10:32 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added a reviewer: Restricted Project. · View Herald Transcript
MaskRay accepted this revision.Dec 17 2020, 11:31 AM

Looks great!

ldionne accepted this revision as: Restricted Project, Restricted Project.Dec 17 2020, 1:19 PM
This revision is now accepted and ready to land.Dec 17 2020, 1:19 PM