This is an archive of the discontinued LLVM Phabricator instance.

[codeview] Put !heapallocsite on calls to operator new
ClosedPublic

Authored by rnk on Jun 1 2020, 5:24 PM.

Details

Summary

Clang marks calls to operator new as heap allocation sites, but the
operator declared at global scope returns void. There is no explicit
cast in the code, so the compiler has to write down the allocated type
itself.

Also generalize a cast to use CallBase, so that we mark heap alloc sites
when exceptions are enabled.

Diff Detail

Event Timeline

rnk created this revision.Jun 1 2020, 5:24 PM
Herald added a project: Restricted Project. · View Herald Transcript
rnk updated this revision to Diff 267767.Jun 1 2020, 5:25 PM
  • revert lld change
MaskRay accepted this revision.Jun 4 2020, 10:27 PM

but the operator declared at global scope returns void.

void -> void pointer

This revision is now accepted and ready to land.Jun 4 2020, 10:27 PM
This revision was automatically updated to reflect the committed changes.
dyung added a subscriber: dyung.Jun 6 2020, 4:39 PM

I've reverted this change in g059ba74bb6f6166ca7c1783ef81dd37a5209b758 to get the bots green again.