Reland: "[libc] Templatize str{,n}cmp"
authorAlex Brachet <abrachet@google.com>
Tue, 10 Jan 2023 15:37:58 +0000 (15:37 +0000)
committerAlex Brachet <abrachet@google.com>
Tue, 10 Jan 2023 15:39:54 +0000 (15:39 +0000)
commitf296dce763f99beb6c23f05ea8f7480515b5f6a9
treeb2088bb48c4f22c1bfea54272497852d12f94c18
parent44a080eee52abdf3c88aff7df399ec23f445484d
Reland: "[libc] Templatize str{,n}cmp"

This will be used to implement the case insensitive str{,n}casecmp

This was initially reverted because it broke tests on arm platforms.
Unfortunately, it didn't break on my arm machine, but I suspect the
problem was the old comparator returned char and not int.

Differential Revision: https://reviews.llvm.org/D141235
libc/src/string/CMakeLists.txt
libc/src/string/memory_utils/CMakeLists.txt
libc/src/string/memory_utils/strcmp_implementations.h [new file with mode: 0644]
libc/src/string/strcmp.cpp
libc/src/string/strncmp.cpp
utils/bazel/llvm-project-overlay/libc/BUILD.bazel