xref: /llvm-project/libc/src/string/memset.cpp (revision 5ff3ff33ff930e4ec49da7910612d8a41eb068cb)
16ca54e01SGuillaume Chatelet //===-- Implementation of memset ------------------------------------------===//
26ca54e01SGuillaume Chatelet //
36ca54e01SGuillaume Chatelet // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
46ca54e01SGuillaume Chatelet // See https://llvm.org/LICENSE.txt for license information.
56ca54e01SGuillaume Chatelet // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66ca54e01SGuillaume Chatelet //
76ca54e01SGuillaume Chatelet //===----------------------------------------------------------------------===//
86ca54e01SGuillaume Chatelet 
96ca54e01SGuillaume Chatelet #include "src/string/memset.h"
106ca54e01SGuillaume Chatelet #include "src/__support/common.h"
11*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h"
121f578347SGuillaume Chatelet #include "src/string/memory_utils/inline_memset.h"
136ca54e01SGuillaume Chatelet 
14*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL {
156ca54e01SGuillaume Chatelet 
16a0b65a7bSMichael Jones LLVM_LIBC_FUNCTION(void *, memset, (void *dst, int value, size_t count)) {
1767437dd0SGuillaume Chatelet   inline_memset(dst, static_cast<uint8_t>(value), count);
186ca54e01SGuillaume Chatelet   return dst;
196ca54e01SGuillaume Chatelet }
206ca54e01SGuillaume Chatelet 
21*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL
22