xref: /llvm-project/libc/src/string/memcmp.cpp (revision 5ff3ff33ff930e4ec49da7910612d8a41eb068cb)
1af68c3b8SCheng Wang //===-- Implementation of memcmp ------------------------------------------===//
2af68c3b8SCheng Wang //
3af68c3b8SCheng Wang // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4af68c3b8SCheng Wang // See https://llvm.org/LICENSE.txt for license information.
5af68c3b8SCheng Wang // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6af68c3b8SCheng Wang //
7af68c3b8SCheng Wang //===----------------------------------------------------------------------===//
8af68c3b8SCheng Wang 
9af68c3b8SCheng Wang #include "src/string/memcmp.h"
10*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h"
111f578347SGuillaume Chatelet #include "src/string/memory_utils/inline_memcmp.h"
12b460534aSGuillaume Chatelet 
13af68c3b8SCheng Wang #include <stddef.h> // size_t
14af68c3b8SCheng Wang 
15*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL {
16af68c3b8SCheng Wang 
17a0b65a7bSMichael Jones LLVM_LIBC_FUNCTION(int, memcmp,
18a0b65a7bSMichael Jones                    (const void *lhs, const void *rhs, size_t count)) {
1967437dd0SGuillaume Chatelet   return inline_memcmp(lhs, rhs, count);
20af68c3b8SCheng Wang }
21af68c3b8SCheng Wang 
22*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL
23