1 //===-- Implementation of bzero -------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_BZERO_IMPLEMENTATIONS_H
10 #define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_BZERO_IMPLEMENTATIONS_H
12 #include "src/__support/common.h"
13 #include "src/string/memory_utils/memset_implementations.h"
15 #include <stddef.h> // size_t
17 namespace __llvm_libc
{
19 LIBC_INLINE
static void inline_bzero(Ptr dst
, size_t count
) {
20 inline_memset(dst
, 0, count
);
23 LIBC_INLINE
static void inline_bzero(void *dst
, size_t count
) {
24 inline_bzero(reinterpret_cast<Ptr
>(dst
), count
);
27 } // namespace __llvm_libc
29 #endif // LLVM_LIBC_SRC_STRING_MEMORY_UTILS_BZERO_IMPLEMENTATIONS_H