[PATCH] D119567: [libcxx] String format class marked as packed

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 25 08:07:32 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG96918f2af67f: [libcxx] String format class marked as packed (authored by stefanp).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119567/new/

https://reviews.llvm.org/D119567

Files:
  libcxx/include/__config
  libcxx/include/__format/parser_std_format_spec.h
  libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_bool.pass.cpp
  libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_char.pass.cpp
  libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_integer.pass.cpp
  libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_string.pass.cpp


Index: libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_string.pass.cpp
===================================================================
--- libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_string.pass.cpp
+++ libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_string.pass.cpp
@@ -8,7 +8,6 @@
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: libcpp-no-concepts
 // UNSUPPORTED: libcpp-has-no-incomplete-format
-// XFAIL: LIBCXX-AIX-FIXME
 
 // <format>
 
Index: libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_integer.pass.cpp
===================================================================
--- libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_integer.pass.cpp
+++ libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_integer.pass.cpp
@@ -8,7 +8,6 @@
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: libcpp-no-concepts
 // UNSUPPORTED: libcpp-has-no-incomplete-format
-// XFAIL: LIBCXX-AIX-FIXME
 
 // <format>
 
Index: libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_char.pass.cpp
===================================================================
--- libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_char.pass.cpp
+++ libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_char.pass.cpp
@@ -8,7 +8,6 @@
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: libcpp-no-concepts
 // UNSUPPORTED: libcpp-has-no-incomplete-format
-// XFAIL: LIBCXX-AIX-FIXME
 
 // <format>
 
Index: libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_bool.pass.cpp
===================================================================
--- libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_bool.pass.cpp
+++ libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_bool.pass.cpp
@@ -8,7 +8,6 @@
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: libcpp-no-concepts
 // UNSUPPORTED: libcpp-has-no-incomplete-format
-// XFAIL: LIBCXX-AIX-FIXME
 
 // <format>
 
Index: libcxx/include/__format/parser_std_format_spec.h
===================================================================
--- libcxx/include/__format/parser_std_format_spec.h
+++ libcxx/include/__format/parser_std_format_spec.h
@@ -52,6 +52,7 @@
  * * The format-type filtering needs to be done post parsing in the parser
  *   derived from @ref __parser_std.
  */
+_LIBCPP_PACKED_BYTE_FOR_AIX
 class _LIBCPP_TYPE_VIS _Flags {
 public:
   enum class _LIBCPP_ENUM_VIS _Alignment : uint8_t {
@@ -109,6 +110,7 @@
 
   _Type __type{_Type::__default};
 };
+_LIBCPP_PACKED_BYTE_FOR_AIX_END
 
 namespace __detail {
 template <class _CharT>
Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -1440,6 +1440,14 @@
 #  define _LIBCPP_GCC_DIAGNOSTIC_IGNORED(str)
 #endif
 
+#if defined(_AIX) && !defined(_LIBCPP_COMPILER_GCC)
+#define _LIBCPP_PACKED_BYTE_FOR_AIX _Pragma("pack(1)")
+#define _LIBCPP_PACKED_BYTE_FOR_AIX_END _Pragma("pack(pop)")
+#else
+#define _LIBCPP_PACKED_BYTE_FOR_AIX      /* empty */
+#define _LIBCPP_PACKED_BYTE_FOR_AIX_END  /* empty */
+#endif
+
 #endif // __cplusplus
 
 #endif // _LIBCPP_CONFIG


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119567.411422.patch
Type: text/x-patch
Size: 3500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220225/8d771756/attachment.bin>


More information about the llvm-commits mailing list