Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bolt
diff options
context:
space:
mode:
authorVladislav Khmelevsky <och95@yandex.ru>2022-07-07 14:48:47 +0300
committerVladislav Khmelevsky <och95@yandex.ru>2022-07-09 01:17:08 +0300
commite10e120cea4196e580e7a04a1d2618d0de48cdeb (patch)
tree10f439f16bb5de6091ae1716286aa305ceaf3bb3 /bolt
parent77a38f6839980bfac61babb40d83772c51427011 (diff)
[BOLT][Runtime] Fix memset definition
Differential Revision: https://reviews.llvm.org/D129321
Diffstat (limited to 'bolt')
-rw-r--r--bolt/runtime/common.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/bolt/runtime/common.h b/bolt/runtime/common.h
index 3920b1479e2e..008dbb6c3de8 100644
--- a/bolt/runtime/common.h
+++ b/bolt/runtime/common.h
@@ -103,9 +103,11 @@ void *memmove(void *Dest, const void *Src, size_t Len) {
return Dest;
}
-void memset(char *Buf, char C, uint32_t Size) {
- for (int I = 0; I < Size; ++I)
- *Buf++ = C;
+void *memset(void *Buf, int C, size_t Size) {
+ char *S = (char *)Buf;
+ for (size_t I = 0; I < Size; ++I)
+ *S++ = C;
+ return Buf;
}
int memcmp(const void *s1, const void *s2, size_t n) {