[libcxx-commits] [PATCH] D138684: [libc++] Use builtins when redeclaring <string.h> functions
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 24 12:01:13 PST 2022
ldionne created this revision.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
When we define the const-correct overloads of <string.h> functions in
libc++ itself, use builtins whenever possible. This avoids depending on
the presence of these functions in the C library headers.
Also, as a fly-by, improve the tests for these functions since we
basically didn't check anything but their signature. We could have
used the wrong builtin (as long as the signature matched) without ever
noticing, which was quite scary.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D138684
Files:
libcxx/include/string.h
libcxx/test/std/depr/depr.c.headers/string_h.pass.cpp
libcxx/test/std/strings/c.strings/cstring.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138684.477832.patch
Type: text/x-patch
Size: 17520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221124/bf8794cb/attachment.bin>
More information about the libcxx-commits
mailing list