[libc-commits] [PATCH] D147822: [libc] Add memmem implementation

Caslyn Tonelli via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Apr 7 16:12:57 PDT 2023


Caslyn created this revision.
Caslyn added reviewers: abrachet, michaelrj.
Herald added subscribers: libc-commits, luke, frasercrmck, ecnelises, luismarques, apazos, sameer.abuasal, tschuett, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb.
Herald added projects: libc-project, All.
Caslyn requested review of this revision.
Herald added a subscriber: pcwang-thead.

Introduce the `memmem` libc string function.

`memmem_implementation` performs shared logic for `strstr`,
`strcasestr`, and `memmem`; essentially reconfiguring what was the
`strstr_implementation` to support length parameters.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147822

Files:
  libc/config/baremetal/arm/entrypoints.txt
  libc/config/darwin/arm/entrypoints.txt
  libc/config/darwin/x86_64/entrypoints.txt
  libc/config/gpu/entrypoints.txt
  libc/config/linux/aarch64/entrypoints.txt
  libc/config/linux/arm/entrypoints.txt
  libc/config/linux/riscv64/entrypoints.txt
  libc/config/linux/x86_64/entrypoints.txt
  libc/config/windows/entrypoints.txt
  libc/spec/gnu_ext.td
  libc/src/string/CMakeLists.txt
  libc/src/string/memmem.cpp
  libc/src/string/memmem.h
  libc/src/string/memory_utils/CMakeLists.txt
  libc/src/string/memory_utils/memmem_implementations.h
  libc/src/string/memory_utils/strstr_implementations.h
  libc/src/string/strcasestr.cpp
  libc/src/string/strstr.cpp
  libc/test/src/string/CMakeLists.txt
  libc/test/src/string/memmem_test.cpp
  utils/bazel/llvm-project-overlay/libc/BUILD.bazel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147822.511819.patch
Type: text/x-patch
Size: 18355 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230407/f73d28c7/attachment-0001.bin>


More information about the libc-commits mailing list