[libcxx-commits] [PATCH] D116120: [libc++][format] Improve ABI stability.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 21 10:15:31 PST 2021
Mordante created this revision.
Mordante added reviewers: ldionne, vitaut.
Mordante requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
During the review of D115991 <https://reviews.llvm.org/D115991> @vitaut pointed out the enum shouldn't
depend on whether or not _LIBCPP_HAS_NO_INT128 is defined. The current
implementation lets the enum's ABI depend on this configuration option
without a good cause.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116120
Files:
libcxx/include/__format/format_arg.h
Index: libcxx/include/__format/format_arg.h
===================================================================
--- libcxx/include/__format/format_arg.h
+++ libcxx/include/__format/format_arg.h
@@ -37,21 +37,20 @@
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
namespace __format {
-/** The type stored in @ref basic_format_arg. */
+/// The type stored in @ref basic_format_arg.
+///
+/// @note The 128-bit types are unconditionally in the list to avoid the values
+/// of the enums to depend on the availability of 128-bit integers.
enum class _LIBCPP_ENUM_VIS __arg_t : uint8_t {
__none,
__boolean,
__char_type,
__int,
__long_long,
-#ifndef _LIBCPP_HAS_NO_INT128
__i128,
-#endif
__unsigned,
__unsigned_long_long,
-#ifndef _LIBCPP_HAS_NO_INT128
__u128,
-#endif
__float,
__double,
__long_double,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116120.395716.patch
Type: text/x-patch
Size: 828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211221/ff741a6e/attachment.bin>
More information about the libcxx-commits
mailing list