This is an archive of the discontinued LLVM Phabricator instance.

[OCaml] Code simplification using string allocation functions
ClosedPublic

Authored by jberdine on Mar 28 2021, 3:32 PM.

Details

Summary

Using the cstr_to_string function that allocates and initializes an
OCaml string value enables simplifications in several cases. This
change also has the effect of avoiding calling memcpy on NULL
pointers even if only 0 bytes are to be copied.

Diff Detail

Event Timeline

jberdine created this revision.Mar 28 2021, 3:32 PM
jberdine requested review of this revision.Mar 28 2021, 3:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 28 2021, 3:32 PM
vaivaswatha accepted this revision.Mar 29 2021, 10:14 AM
This revision is now accepted and ready to land.Mar 29 2021, 10:14 AM
This revision was landed with ongoing or failed builds.Apr 5 2021, 2:59 AM
This revision was automatically updated to reflect the committed changes.