summaryrefslogtreecommitdiff
path: root/libc/src/string/memcmp.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2022-10-13 14:43:44 +0000
committerGuillaume Chatelet <gchatelet@google.com>2022-10-13 14:44:03 +0000
commitd55f2d8ab076298cfd745c05c1b4dfd5583f8b9e (patch)
treee626119cdbc6fa0d21aa8699cf2d02dc7411625b /libc/src/string/memcmp.cpp
parent82ca390062d11512528e3d357d8d3d7b69477caf (diff)
[libc] New version of the mem* framework
This version is more composable and also simpler at the expense of being more explicit and more verbose. It also provides minimal implementations for ARM platforms. Codegen can be checked here https://godbolt.org/z/x19zvE59v Differential Revision: https://reviews.llvm.org/D135134
Diffstat (limited to 'libc/src/string/memcmp.cpp')
-rw-r--r--libc/src/string/memcmp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/src/string/memcmp.cpp b/libc/src/string/memcmp.cpp
index 292525e17dad..357b57d1dbea 100644
--- a/libc/src/string/memcmp.cpp
+++ b/libc/src/string/memcmp.cpp
@@ -15,8 +15,8 @@ namespace __llvm_libc {
LLVM_LIBC_FUNCTION(int, memcmp,
(const void *lhs, const void *rhs, size_t count)) {
- return inline_memcmp(static_cast<const char *>(lhs),
- static_cast<const char *>(rhs), count);
+ return static_cast<int>(inline_memcmp(static_cast<const char *>(lhs),
+ static_cast<const char *>(rhs), count));
}
} // namespace __llvm_libc