[libc++] Reduces std::to_chars instantiations.
Instead of instantiating all functions called by std::to_chars for the integral types only instantiate them for 32 and 64 bit integral types. This results in a smaller binary when using different types. In an example using the types: signed char, short, int, long, long long, unsigned char, unsigned short, unsigned int, unsigned long, and unsigned long long this saved 2792 bytes of code size. For libc++.so.1 is saves 688 bytes of code size (64-bit Linux). This was discovered while investigating a solution for #52709. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D128215
Loading
Please sign in to comment