1*6ca54e01SGuillaume Chatelet //===-- Implementation of memset ------------------------------------------===// 2*6ca54e01SGuillaume Chatelet // 3*6ca54e01SGuillaume Chatelet // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*6ca54e01SGuillaume Chatelet // See https://llvm.org/LICENSE.txt for license information. 5*6ca54e01SGuillaume Chatelet // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*6ca54e01SGuillaume Chatelet // 7*6ca54e01SGuillaume Chatelet //===----------------------------------------------------------------------===// 8*6ca54e01SGuillaume Chatelet 9*6ca54e01SGuillaume Chatelet #include "src/string/memset.h" 10*6ca54e01SGuillaume Chatelet #include "src/__support/common.h" 11*6ca54e01SGuillaume Chatelet #include "src/string/memory_utils/memset_utils.h" 12*6ca54e01SGuillaume Chatelet 13*6ca54e01SGuillaume Chatelet namespace __llvm_libc { 14*6ca54e01SGuillaume Chatelet 15*6ca54e01SGuillaume Chatelet void *LLVM_LIBC_ENTRYPOINT(memset)(void *dst, int value, size_t count) { 16*6ca54e01SGuillaume Chatelet GeneralPurposeMemset(reinterpret_cast<char *>(dst), 17*6ca54e01SGuillaume Chatelet static_cast<unsigned char>(value), count); 18*6ca54e01SGuillaume Chatelet return dst; 19*6ca54e01SGuillaume Chatelet } 20*6ca54e01SGuillaume Chatelet 21*6ca54e01SGuillaume Chatelet } // namespace __llvm_libc 22