This is an archive of the discontinued LLVM Phabricator instance.

[libc] Fix memcpy to adhere to qualified calls.
ClosedPublic

Authored by PaulkaToast on Apr 1 2020, 5:06 PM.

Details

Summary

Switched to using the new memcpy implementation.

Diff Detail

Event Timeline

PaulkaToast created this revision.Apr 1 2020, 5:06 PM
This revision is now accepted and ready to land.Apr 2 2020, 12:11 AM
abrachet accepted this revision.Apr 2 2020, 12:45 AM
abrachet added inline comments.
libc/src/string/strcpy.cpp
19

Should we wait for D77279 to use __llvm_libc::strlen?

This patch largely looks good, but I have a question inline.

libc/src/math/round_redirector.cpp
16 ↗(On Diff #254361)

This comment is not quite the right thing to say. This is a redirector so the expectation is to call round from the system libc.

17 ↗(On Diff #254361)

Redirected calls should not need NOLINT annotations. Calling into system libc is correct by design. What is failing without this NOLINT annotation?

libc/src/string/strcpy.cpp
19

Yes. Wait for D77279 and absorb the change here.

libc/test/src/string/CMakeLists.txt
14

Can you add a TODO (sivachandra) here and below to remove the redundant deps?

PaulkaToast marked 7 inline comments as done.
PaulkaToast retitled this revision from [libc] Fix round and memcpy to adhere to qualified calls. to [libc] Fix memcpy to adhere to qualified calls..
PaulkaToast edited the summary of this revision. (Show Details)
PaulkaToast added inline comments.
libc/src/math/round_redirector.cpp
17 ↗(On Diff #254361)

You're right, redirectors do this by design. Removed comment and nolint.

libc/src/string/strcpy.cpp
19

Gotcha (:

This revision was automatically updated to reflect the committed changes.