[libc] Add custom operator new to handle allocation failures gracefully.
This patch adds the implementation of the custom operator new functions. The implementation of the internal strdup has been updated to use operator new for allocation. We will make it a policy and document that all allocations have to go through the libc's own operator new. A future change will also add operator delete replacements and make it a policy that deallocations in libc internal code have to go through those replacements. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D139584
Loading
Please sign in to comment