| 1 | //===-- Implementation of wmemset -----------------------------------------===// |
| 2 | // |
| 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 |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #include "src/wchar/wmemset.h" |
| 10 | |
| 11 | #include "hdr/types/size_t.h" |
| 12 | #include "hdr/types/wchar_t.h" |
| 13 | #include "src/__support/common.h" |
| 14 | |
| 15 | namespace LIBC_NAMESPACE_DECL { |
| 16 | |
| 17 | LLVM_LIBC_FUNCTION(wchar_t *, wmemset, (wchar_t * s, wchar_t c, size_t n)) { |
| 18 | for (size_t i = 0; i < n; i++) |
| 19 | s[i] = c; |
| 20 | |
| 21 | return s; |
| 22 | } |
| 23 | |
| 24 | } // namespace LIBC_NAMESPACE_DECL |
| 25 | |