[all-commits] [llvm/llvm-project] a0c4f8: [libc] Change ctype to be encoding independent (#1...

Michael Jones via All-commits all-commits at lists.llvm.org
Tue Dec 3 12:36:27 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a0c4f854cad2b97e44a1b58dc1fd982e1c4d60f3
      https://github.com/llvm/llvm-project/commit/a0c4f854cad2b97e44a1b58dc1fd982e1c4d60f3
  Author: Michael Jones <michaelrj at google.com>
  Date:   2024-12-03 (Tue, 03 Dec 2024)

  Changed paths:
    M libc/src/__support/ctype_utils.h
    M libc/src/__support/high_precision_decimal.h
    M libc/src/__support/integer_literals.h
    M libc/src/__support/integer_to_string.h
    M libc/src/__support/str_to_float.h
    M libc/src/__support/str_to_integer.h
    M libc/src/ctype/isxdigit.cpp
    M libc/src/ctype/isxdigit_l.cpp
    M libc/src/ctype/toupper.cpp
    M libc/src/ctype/toupper_l.cpp
    M libc/src/stdio/printf_core/fixed_converter.h
    M libc/src/stdio/printf_core/float_dec_converter.h
    M libc/src/stdio/printf_core/float_hex_converter.h
    M libc/src/stdio/printf_core/float_inf_nan_converter.h
    M libc/src/stdio/printf_core/int_converter.h
    M libc/src/stdio/scanf_core/converter_utils.h
    M libc/src/stdio/scanf_core/float_converter.cpp
    M libc/src/stdio/scanf_core/int_converter.cpp
    M libc/src/stdio/scanf_core/ptr_converter.cpp
    M libc/test/UnitTest/MemoryMatcher.cpp
    M libc/test/src/__support/CPP/stringview_test.cpp
    M libc/test/src/ctype/isalnum_test.cpp
    M libc/test/src/ctype/isalpha_test.cpp
    M libc/test/src/ctype/isdigit_test.cpp
    M libc/test/src/ctype/islower_test.cpp
    M libc/test/src/ctype/isupper_test.cpp
    M libc/test/src/ctype/isxdigit_test.cpp
    M libc/test/src/ctype/tolower_test.cpp
    M libc/test/src/ctype/toupper_test.cpp
    M libc/test/src/stdlib/StrtolTest.h
    M libc/test/src/string/strcmp_test.cpp
    M utils/bazel/llvm-project-overlay/libc/BUILD.bazel
    M utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel

  Log Message:
  -----------
  [libc] Change ctype to be encoding independent (#110574)

The previous implementation of the ctype functions assumed ASCII.
This patch changes to a switch/case implementation that looks odd, but
actually is easier for the compiler to understand and optimize.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list