summaryrefslogtreecommitdiff
path: root/libc/config
diff options
context:
space:
mode:
authorCaslyn Tonelli <caslyn@google.com>2023-04-03 21:56:49 +0000
committerCaslyn Tonelli <caslyn@google.com>2023-04-07 00:09:22 +0000
commita1e4f1d006a5a669aaa874b8d36f58d9b086620f (patch)
treeaa49006e788f5ac1ad58da33ee26b334c268a527 /libc/config
parentfc025f7437818b2873ec1f14dd52ab558b9ec1aa (diff)
downloadllvm-a1e4f1d006a5a669aaa874b8d36f58d9b086620f.tar.gz
[libc] Add strxfrm Implementation
Introduce `strxfrm` and unit tests. The current implementation is introduced without locale support. The simplified function performs a `memcpy` if the `n` value is large enough to store the source len + '\0', otherwise `dest` is unmodified. Ticket: https://fxbug.dev/124217 Differential Revision: https://reviews.llvm.org/D147478
Diffstat (limited to 'libc/config')
-rw-r--r--libc/config/linux/riscv64/entrypoints.txt1
-rw-r--r--libc/config/linux/x86_64/entrypoints.txt1
2 files changed, 2 insertions, 0 deletions
diff --git a/libc/config/linux/riscv64/entrypoints.txt b/libc/config/linux/riscv64/entrypoints.txt
index 9daf4ed8ed2e..cd41baeaf9dd 100644
--- a/libc/config/linux/riscv64/entrypoints.txt
+++ b/libc/config/linux/riscv64/entrypoints.txt
@@ -72,6 +72,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.string.strstr
libc.src.string.strtok
libc.src.string.strtok_r
+ libc.src.string.strxfrm
# inttypes.h entrypoints
libc.src.inttypes.imaxabs
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index b74bc665ca1f..0b024b1fd486 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -72,6 +72,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.string.strstr
libc.src.string.strtok
libc.src.string.strtok_r
+ libc.src.string.strxfrm
# inttypes.h entrypoints
libc.src.inttypes.imaxabs