Skip to content

Commit

Permalink
[BOLT][Runtime] Fix memset definition
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D129321
  • Loading branch information
yota9 committed Jul 8, 2022
1 parent 77a38f6 commit e10e120
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bolt/runtime/common.h
Expand Up @@ -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) {
Expand Down

0 comments on commit e10e120

Please sign in to comment.