[all-commits] [llvm/llvm-project] cb3c41: [libc] Refactor string to float return values

michaelrj-google via All-commits all-commits at lists.llvm.org
Tue Feb 28 10:50:56 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb3c41c285fc76f21162c67503de32f83f278fae
      https://github.com/llvm/llvm-project/commit/cb3c41c285fc76f21162c67503de32f83f278fae
  Author: Michael Jones <michaelrj at google.com>
  Date:   2023-02-28 (Tue, 28 Feb 2023)

  Changed paths:
    M libc/src/__support/CMakeLists.txt
    M libc/src/__support/high_precision_decimal.h
    M libc/src/__support/str_to_float.h
    M libc/src/stdio/scanf_core/converter_utils.h
    M libc/src/stdlib/atof.cpp
    M libc/src/stdlib/strtod.cpp
    M libc/src/stdlib/strtof.cpp
    M libc/src/stdlib/strtold.cpp
    M libc/test/src/__support/str_to_float_test.cpp
    M utils/bazel/llvm-project-overlay/libc/BUILD.bazel

  Log Message:
  -----------
  [libc] Refactor string to float return values

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.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D144597




More information about the All-commits mailing list