1db8a88feSMichael Jones //===-- Implementation of mempcpy ----------------------------------------===// 2db8a88feSMichael Jones // 3db8a88feSMichael Jones // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4db8a88feSMichael Jones // See https://llvm.org/LICENSE.txt for license information. 5db8a88feSMichael Jones // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6db8a88feSMichael Jones // 7db8a88feSMichael Jones //===----------------------------------------------------------------------===// 8db8a88feSMichael Jones 9db8a88feSMichael Jones #include "src/string/mempcpy.h" 10*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 111f578347SGuillaume Chatelet #include "src/string/memory_utils/inline_memcpy.h" 12db8a88feSMichael Jones 13db8a88feSMichael Jones #include "src/__support/common.h" 14db8a88feSMichael Jones #include <stddef.h> // For size_t. 15db8a88feSMichael Jones 16*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 17db8a88feSMichael Jones 18db8a88feSMichael Jones LLVM_LIBC_FUNCTION(void *, mempcpy, 1967437dd0SGuillaume Chatelet (void *__restrict dst, const void *__restrict src, 20db8a88feSMichael Jones size_t count)) { 2167437dd0SGuillaume Chatelet inline_memcpy(dst, src, count); 2267437dd0SGuillaume Chatelet return reinterpret_cast<char *>(dst) + count; 23db8a88feSMichael Jones } 24db8a88feSMichael Jones 25*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 26