[PATCH] D119567: [libcxx] String format class marked as packed
Arthur O'Dwyer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 15 13:02:31 PST 2022
Quuxplusone accepted this revision.
Quuxplusone added inline comments.
================
Comment at: libcxx/include/__format/parser_std_format_spec.h:55
*/
-class _LIBCPP_TYPE_VIS _Flags {
+class _LIBCPP_TYPE_VIS __attribute__((__packed__)) _Flags {
public:
----------------
If I ran the zoo, I'd make this struct `__attribute__((__packed__))` //only on AIX//, and leave it "normal" everywhere else. I'm worried that a packed struct might behave observably differently on some non-AIX platform and have some effect that we didn't expect. But I'm not aware of any //concrete// problem with how you've got it now.
Pre-existing nit: I would also move lines 83–87 down next to line 110 to keep all the members together.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119567/new/
https://reviews.llvm.org/D119567
More information about the llvm-commits
mailing list