[libc-commits] [PATCH] D144597: [libc] Refactor string to float return values

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Feb 22 15:22:09 PST 2023


michaelrj created this revision.
michaelrj added reviewers: sivachandra, lntue.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
michaelrj requested review of this revision.

The internal implementation of the string to float function previously
used pointer arguments for returning several values. Additionally it
set errno in several unexpected places. Now all of that goes through
return structs. For readability I also moved the function away from raw
pointer arithmetic towards proper indexing. I also added support for
rounding modes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144597

Files:
  libc/src/__support/CMakeLists.txt
  libc/src/__support/high_precision_decimal.h
  libc/src/__support/str_to_float.h
  libc/src/stdio/scanf_core/converter_utils.h
  libc/src/stdlib/atof.cpp
  libc/src/stdlib/strtod.cpp
  libc/src/stdlib/strtof.cpp
  libc/src/stdlib/strtold.cpp
  libc/test/src/__support/str_to_float_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144597.499657.patch
Type: text/x-patch
Size: 49753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230222/e7171078/attachment-0001.bin>


More information about the libc-commits mailing list