This is an archive of the discontinued LLVM Phabricator instance.

CGExprCXX: emit allocptr attributes for operator delete
Needs ReviewPublic

Authored by durin42 on Apr 4 2022, 3:17 PM.

Details

Reviewers
jyknight
Summary

With this change, we're almost ready to drop the entire table out of
MemoryBuiltins.cpp and rely solely on attributes to detect allocator
functions.

Diff Detail

Event Timeline

durin42 created this revision.Apr 4 2022, 3:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2022, 3:17 PM
durin42 requested review of this revision.Apr 4 2022, 3:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2022, 3:17 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
durin42 updated this revision to Diff 420854.Apr 6 2022, 7:41 AM
durin42 edited the summary of this revision. (Show Details)
durin42 updated this revision to Diff 420915.Apr 6 2022, 9:10 AM
durin42 planned changes to this revision.Apr 6 2022, 11:03 AM

I'll hold off on this one until the other LLVM patches are done, then mail out the clang work as its own logical unit.

durin42 requested review of this revision.Jun 7 2023, 3:05 PM
durin42 updated this revision to Diff 529444.
durin42 updated this revision to Diff 529613.Jun 8 2023, 8:49 AM

FYI: this is ready for review.

jyknight added inline comments.Jun 13 2023, 3:41 PM
clang/lib/CodeGen/CGExprCXX.cpp
1333

Perhaps we should add this attribute to the fn decl and all calls? I think that unlike "alloc-family" in the future patch, this attribute probably doesn't need to be only applied to these "builtin" uses?