[libc-commits] [PATCH] D156981: [libc] Better IntegerToString API
Guillaume Chatelet via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Aug 3 02:55:10 PDT 2023
gchatelet created this revision.
gchatelet added reviewers: michaelrj, jhuber6, lntue, sivachandra.
Herald added projects: libc-project, All.
Herald added a subscriber: libc-commits.
gchatelet requested review of this revision.
This patch is an alternative to D155902 <https://reviews.llvm.org/D155902>. It provides the following benefits:
- No buffer manual allocation and error handling for the general case
- More flexible API : width specifier, sign and prefix handling
- Simpler code
The more flexible API removes the need for manually tweaking the buffer afterwards, and so prevents relying on implementation details of IntegerToString.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D156981
Files:
libc/src/__support/CPP/string.h
libc/src/__support/CPP/stringstream.h
libc/src/__support/CPP/type_traits.h
libc/src/__support/FPUtil/fpbits_str.h
libc/src/__support/StringUtil/error_to_string.cpp
libc/src/__support/StringUtil/signal_to_string.cpp
libc/src/__support/UInt.h
libc/src/__support/integer_to_string.h
libc/src/__support/libc_assert.h
libc/src/__support/threads/linux/thread.cpp
libc/src/stdio/printf_core/float_dec_converter.h
libc/src/stdio/printf_core/int_converter.h
libc/test/UnitTest/LibcTest.cpp
libc/test/UnitTest/TestLogger.cpp
libc/test/src/__support/integer_to_string_test.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156981.546779.patch
Type: text/x-patch
Size: 62572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230803/14499409/attachment-0001.bin>
More information about the libc-commits
mailing list