forked from OSchip/llvm-project
[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:
parent
d3208cf1cd
commit
467b5017e2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue