xref: /freebsd/contrib/llvm-project/compiler-rt/lib/memprof/memprof_interceptors_memintrinsics.cpp (revision 924226fba12cc9a228c73b956e1b7fa24c60b055)
1 //===-- memprof_interceptors_memintrinsics.cpp ---------------------------===//
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 // This file is a part of MemProfiler, a memory profiler.
10 //
11 // MemProf versions of memcpy, memmove, and memset.
12 //===---------------------------------------------------------------------===//
13 
14 #include "memprof_interceptors_memintrinsics.h"
15 #include "memprof_stack.h"
16 
17 using namespace __memprof;
18 
19 void *__memprof_memcpy(void *to, const void *from, uptr size) {
20   MEMPROF_MEMCPY_IMPL(to, from, size);
21 }
22 
23 void *__memprof_memset(void *block, int c, uptr size) {
24   MEMPROF_MEMSET_IMPL(block, c, size);
25 }
26 
27 void *__memprof_memmove(void *to, const void *from, uptr size) {
28   MEMPROF_MEMMOVE_IMPL(to, from, size);
29 }
30