This is an archive of the discontinued LLVM Phabricator instance.

LangRef: note that `allockind("free")` requires void return
ClosedPublic

Authored by durin42 on Jul 26 2022, 7:00 AM.

Details

Summary

Otherwise we have to work pretty hard to ensure a discarded alloc/free
pair doesn't remove a return value that's still useful.

Diff Detail

Event Timeline

durin42 created this revision.Jul 26 2022, 7:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2022, 7:00 AM
Herald added a subscriber: jdoerfert. · View Herald Transcript
durin42 requested review of this revision.Jul 26 2022, 7:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2022, 7:00 AM
nlopes accepted this revision.Jul 26 2022, 7:09 AM

LGTM, thank you!

This revision is now accepted and ready to land.Jul 26 2022, 7:09 AM
This revision was landed with ongoing or failed builds.Jul 26 2022, 7:10 AM
This revision was automatically updated to reflect the committed changes.
nikic added a subscriber: nikic.Jul 26 2022, 8:30 AM

We should add a corresponding check to the IR verifier.

We should probably also specify that alloc/realloc must return a pointer type.