This is an archive of the discontinued LLVM Phabricator instance.

[libc][NFC] Allow memset (and bzero) to be inlined
ClosedPublic

Authored by gchatelet on Nov 3 2021, 7:59 AM.

Details

Summary

This allows shipping individual functions without also having to provide
memset or bzero at the expense of bigger functions.

Similar to D113097.

Diff Detail

Event Timeline

gchatelet created this revision.Nov 3 2021, 7:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 3 2021, 7:59 AM
gchatelet requested review of this revision.Nov 3 2021, 7:59 AM
gchatelet updated this revision to Diff 384443.Nov 3 2021, 8:02 AM
  • Also fix CMakeLists.txt
michaelrj added inline comments.Nov 3 2021, 10:14 AM
libc/src/string/memory_utils/memset_implementations.h
8–10

Should the new inline files have header guards?

gchatelet updated this revision to Diff 384709.Nov 4 2021, 5:04 AM
  • Also fix CMakeLists.txt
  • add header guard, rename function and filename.
gchatelet marked an inline comment as done.Nov 4 2021, 5:05 AM
gchatelet accepted this revision.Nov 4 2021, 6:34 AM

I've added the header guard and renamed the file and function, so I think this is good to go.

This revision is now accepted and ready to land.Nov 4 2021, 6:34 AM
This revision was automatically updated to reflect the committed changes.
libc/src/string/CMakeLists.txt