[PATCH] D108577: Avoid -Waix-compat warning with SmallVector class
Jake Egan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 24 07:30:41 PDT 2021
Jake-Egan updated this revision to Diff 368340.
Jake-Egan added a comment.
Add condition for _AIX.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108577/new/
https://reviews.llvm.org/D108577
Files:
llvm/lib/Support/SmallVector.cpp
Index: llvm/lib/Support/SmallVector.cpp
===================================================================
--- llvm/lib/Support/SmallVector.cpp
+++ llvm/lib/Support/SmallVector.cpp
@@ -19,12 +19,21 @@
// Check that no bytes are wasted and everything is well-aligned.
namespace {
+#if defined(_AIX) && __open_xl_version__ >= 17
+struct Struct16B {
+ void *X __align(16);
+};
+struct Struct32B {
+ void *X __align(32);
+};
+#else
struct Struct16B {
alignas(16) void *X;
};
struct Struct32B {
alignas(32) void *X;
};
+#endif
}
static_assert(sizeof(SmallVector<void *, 0>) ==
sizeof(unsigned) * 2 + sizeof(void *),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108577.368340.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210824/a5404e36/attachment.bin>
More information about the llvm-commits
mailing list