[libc] Move strdup implementation to a new header
The `strdup` family of functions rely on `malloc` to be implemented. Its presence in the `string_utils.h` header meant that compiling many of the string functions relied on `malloc` being implementated as well. This patch simply moves the implementation into a new file to avoid including `stdlib.h` from the other string functions. This was a barrier for compiling string functions for the GPU where there is no malloc currently. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D138607
Loading
Please sign in to comment