Commit 256c5829 authored by Mark de Wever's avatar Mark de Wever
Browse files

[libc++][format] Adds ABI tags to inline constexpr variables.

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.
parent 6f44bb77
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment