projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77a38f6
)
[BOLT][Runtime] Fix memset definition
author
Vladislav Khmelevsky
<och95@yandex.ru>
Thu, 7 Jul 2022 11:48:47 +0000
(14:48 +0300)
committer
Vladislav Khmelevsky
<och95@yandex.ru>
Fri, 8 Jul 2022 22:17:08 +0000
(
01:17
+0300)
Differential Revision: https://reviews.llvm.org/D129321
bolt/runtime/common.h
patch
|
blob
|
history
diff --git
a/bolt/runtime/common.h
b/bolt/runtime/common.h
index
3920b14
..
008dbb6
100644
(file)
--- 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) {