Path: blob/main/system/lib/llvm-libc/src/string/memcmp.cpp
6175 views
//===-- Implementation of memcmp ------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "src/string/memcmp.h"9#include "src/__support/macros/config.h"10#include "src/__support/macros/null_check.h"11#include "src/string/memory_utils/inline_memcmp.h"1213#include <stddef.h> // size_t1415namespace LIBC_NAMESPACE_DECL {1617LLVM_LIBC_FUNCTION(int, memcmp,18(const void *lhs, const void *rhs, size_t count)) {19if (count) {20LIBC_CRASH_ON_NULLPTR(lhs);21LIBC_CRASH_ON_NULLPTR(rhs);22}23return inline_memcmp(lhs, rhs, count);24}2526} // namespace LIBC_NAMESPACE_DECL272829