1//===-- Implementation of wmempcpy ----------------------------------------===//
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/wmempcpy.h"
10
11#include "hdr/types/size_t.h"
12#include "hdr/types/wchar_t.h"
13#include "src/__support/common.h"
14
15namespace LIBC_NAMESPACE_DECL {
16
17LLVM_LIBC_FUNCTION(wchar_t *, wmempcpy,
18 (wchar_t *__restrict to, const wchar_t *__restrict from,
19 size_t size)) {
20 __builtin_memcpy(to, from, size * sizeof(wchar_t));
21 return reinterpret_cast<wchar_t *>(to) + size;
22}
23
24} // namespace LIBC_NAMESPACE_DECL
25

source code of libc/src/wchar/wmempcpy.cpp