This is an archive of the discontinued LLVM Phabricator instance.

[SLC] Transform strncpy(dst, "text", C) to memcpy(dst, "text\0\0\0", C) for C <= 128 only
ClosedPublic

Authored by xbolva00 on Aug 14 2020, 4:10 PM.

Details

Summary

Transformation creates big strings for big C values, so bail out for C > 128.

Diff Detail

Event Timeline

xbolva00 created this revision.Aug 14 2020, 4:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2020, 4:10 PM
xbolva00 requested review of this revision.Aug 14 2020, 4:10 PM
efriedma accepted this revision.Aug 14 2020, 4:28 PM

LGTM, thanks

This revision is now accepted and ready to land.Aug 14 2020, 4:28 PM