[all-commits] [llvm/llvm-project] d17917: [libc++][format] Adds ABI tags to inline constexpr...

Mark de Wever via All-commits all-commits at lists.llvm.org
Mon Mar 25 10:33:51 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d179176f3e3505044ad14be19ccb3459a70206a9
      https://github.com/llvm/llvm-project/commit/d179176f3e3505044ad14be19ccb3459a70206a9
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2024-03-25 (Mon, 25 Mar 2024)

  Changed paths:
    M libcxx/include/__config
    M libcxx/include/__format/escaped_output_table.h
    M libcxx/include/__format/extended_grapheme_cluster_table.h
    M libcxx/include/__format/parser_std_format_spec.h
    M libcxx/include/__format/width_estimation_table.h
    M libcxx/utils/generate_escaped_output_table.py
    M libcxx/utils/generate_extended_grapheme_cluster_table.py
    M libcxx/utils/generate_width_estimation_table.py

  Log Message:
  -----------
  [libc++][format] Adds ABI tags to inline constexpr variables. (#86293)

This uses the macro on record types and inline constexpr variables. The
tagged declarations are very likely to change in future versions of
libc++:
- __fields are internal types used to control the formatter's parse
functions which fields to expect. Newer formatters may add new fields.
For example the filesystem::path formatter accepted in the recent Tokyo
meeting added a new 'g' flag, which differs from the 'g' type.
- The Unicode tables. The number of entries in these table likely differ
between Unicode versions. The tables contain only a part of all Unicode
properties. Typically they are stored in a 32-bit entry where some bits
contain the properties and other bits the size of the range. Changes in
the Unicode or C++ algorithms may require more properties to be
available in C++. This may affect the number of bits available in the
range. If needed, other declarations get the macro. This is mainly a
first time to review this approach.

This was originally https://reviews.llvm.org/D143494 where a new macro
_LIBCPP_HIDE_FROM_ABI_TYPE was defined. Testing revealed the existing
macro _LIBCPP_HIDE_FROM_ABI could be used. The "parts" of the macro that
do not affect records are not harmful. Based on this information the
existing macro was used and additional documentation was written.



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