llvm-project/clang/test/CodeGen/memcpy-nobuiltin.inc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
433 B
PHP
Raw Normal View History

#include <stddef.h>
extern void *memcpy(void *dest, void const *from, size_t n);
#ifdef WITH_DECL
inline void *memcpy(void *dest, void const *from, size_t n) {
char const *ifrom = from;
char *idest = dest;
while (n--)
*idest++ = *ifrom++;
return dest;
}
#endif
#ifdef WITH_SELF_REFERENCE_DECL
inline void *memcpy(void *dest, void const *from, size_t n) {
if (n != 0)
memcpy(dest, from, n);
return dest;
}
#endif