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

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 11 10:59:47 PST 2022


stefanp created this revision.
stefanp added reviewers: nemanjai, hubert.reinterpretcast, daltenty, xingxue.
stefanp requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This patch marks the class _Flags as packed becuase the design assumes that it
is packed and a number of tests also assume that it is packed. However on AIX
the class is not packed unless it is marked as such.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119567

Files:
  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
@@ -108,7 +108,7 @@
   };
 
   _Type __type{_Type::__default};
-};
+} __attribute__((packed));
 
 namespace __detail {
 template <class _CharT>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119567.407960.patch
Type: text/x-patch
Size: 2657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220211/12a17a2a/attachment.bin>


More information about the llvm-commits mailing list