[all-commits] [llvm/llvm-project] a1e4f1: [libc] Add strxfrm Implementation

Caslyn Tonelli via All-commits all-commits at lists.llvm.org
Thu Apr 6 17:10:38 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a1e4f1d006a5a669aaa874b8d36f58d9b086620f
      https://github.com/llvm/llvm-project/commit/a1e4f1d006a5a669aaa874b8d36f58d9b086620f
  Author: Caslyn Tonelli <caslyn at google.com>
  Date:   2023-04-07 (Fri, 07 Apr 2023)

  Changed paths:
    M libc/config/linux/riscv64/entrypoints.txt
    M libc/config/linux/x86_64/entrypoints.txt
    M libc/src/string/CMakeLists.txt
    A libc/src/string/strxfrm.cpp
    A libc/src/string/strxfrm.h
    M libc/test/src/string/CMakeLists.txt
    A libc/test/src/string/strxfrm_test.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list