[libc++][format] Fixes visit_format_arg.
The Standard specifies which types are stored in the basic_format_arg "variant" and which types are stored as a handle. Libc++ stores additional types in the "variant". During a reflector discussion @jwakely mention this is user observable; visit_format_arg uses the type instead of a handle as argument. This optimization is useful and will probably be used for other small types in the future. To be conferment the visitor creates a handle and uses that as argument. There is a second visitor so the formatter can still directly access the 128-bit integrals. The test for the visitor and get has been made public too, there is no reason not too. The 128-bit integral types are required by the Standard, when they are available. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D138052
Loading
Please sign in to comment