[libc] fix memcpy builtin looping

previously, memcpy could get stuck in a loop, calling __builtin_memcpy
which would redirect to itself. This patch removes that path.

Reviewed By: gchatelet, sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D115542
This commit is contained in:
Michael Jones 2021-12-10 10:55:38 -08:00
parent d3208cf1cd
commit 467b5017e2
1 changed files with 0 additions and 2 deletions

View File

@ -511,8 +511,6 @@ template <size_t Size> struct Builtin {
// __builtin_memcpy_inline guarantees to never call external functions.
// Unfortunately it is not widely available.
__builtin_memcpy_inline(dst, src, SIZE);
#elif __has_builtin(__builtin_memcpy)
__builtin_memcpy(dst, src, SIZE);
#else
for_loop_copy(dst, src);
#endif