Path: blob/main/system/lib/llvm-libc/src/string/memset.cpp
6175 views
//===-- Implementation of memset ------------------------------------------===//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/memset.h"9#include "src/__support/common.h"10#include "src/__support/macros/config.h"11#include "src/__support/macros/null_check.h"12#include "src/string/memory_utils/inline_memset.h"1314namespace LIBC_NAMESPACE_DECL {1516LLVM_LIBC_FUNCTION(void *, memset, (void *dst, int value, size_t count)) {17if (count)18LIBC_CRASH_ON_NULLPTR(dst);1920inline_memset(dst, static_cast<uint8_t>(value), count);21return dst;22}2324} // namespace LIBC_NAMESPACE_DECL252627