[libc-commits] [PATCH] D147822: [libc] Add memmem implementation
Roland McGrath via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Apr 11 12:20:15 PDT 2023
mcgrathr accepted this revision.
mcgrathr added a comment.
This revision is now accepted and ready to land.
LGTM. We can look into any possible code-sharing with strstr_implementation later along with optimization.
================
Comment at: libc/src/string/memmem.cpp:18
+ const void *needle, size_t needle_len)) {
+ auto comp = [](char l, char r) -> int { return l - r; };
+ return memmem_implementation(haystack, haystack_len, needle, needle_len,
----------------
Can be constexpr.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147822/new/
https://reviews.llvm.org/D147822
More information about the libc-commits
mailing list