[libc] Add a convenience class and function for integer to string conversion.
authorSiva Chandra Reddy <sivachandra@google.com>
Wed, 20 Jul 2022 21:02:53 +0000 (21:02 +0000)
committerSiva Chandra Reddy <sivachandra@google.com>
Thu, 21 Jul 2022 20:18:59 +0000 (20:18 +0000)
commit7c666c14f82ee13ddd222aba9543a5579e608e03
treefd33ece4cefb87aac1b82eaf4e1b392b9b9fb9f6
parent606348cc72389de481c014afb0f15af7360fc950
[libc] Add a convenience class and function for integer to string conversion.

Printf's integer converter has been modified to use the new converter. In
future, it will be used to implement other parts of the libc.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D130227
libc/src/__support/CMakeLists.txt
libc/src/__support/CPP/TypeTraits.h
libc/src/__support/integer_to_string.h [new file with mode: 0644]
libc/src/stdio/printf_core/CMakeLists.txt
libc/src/stdio/printf_core/int_converter.h
libc/test/src/__support/CMakeLists.txt
libc/test/src/__support/integer_to_string_test.cpp [new file with mode: 0644]