[PATCH] D102715: [AIX] Fix LIT failure on native aix

Xiangling Liao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 18 17:09:20 PDT 2021


Xiangling_L updated this revision to Diff 346308.
Xiangling_L added a comment.

Add comments to the block;


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

https://reviews.llvm.org/D102715

Files:
  clang/test/Sema/struct-packed-align.c


Index: clang/test/Sema/struct-packed-align.c
===================================================================
--- clang/test/Sema/struct-packed-align.c
+++ clang/test/Sema/struct-packed-align.c
@@ -167,6 +167,11 @@
 // must maintain ABI backwards compatibility.
 extern int o1[sizeof(struct packed_chars) == 3 ? 1 : -1];
 extern int o2[__alignof(struct packed_chars) == 1 ? 1 : -1];
+#elif defined(_AIX)
+// On AIX, [bool, char, short] bitfields have the same alignment as unsigned
+// int.
+extern int o1[sizeof(struct packed_chars) == 4 ? 1 : -1];
+extern int o2[__alignof(struct packed_chars) == 4 ? 1 : -1];
 #else
 extern int o1[sizeof(struct packed_chars) == 2 ? 1 : -1];
 extern int o2[__alignof(struct packed_chars) == 1 ? 1 : -1];


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102715.346308.patch
Type: text/x-patch
Size: 743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210519/1460d75e/attachment.bin>


More information about the cfe-commits mailing list