[PATCH] D108577: Avoid -Waix-compat warning with SmallVector class
Jake Egan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 23 13:08:49 PDT 2021
Jake-Egan created this revision.
Herald added subscribers: dexonsmith, hiraditya.
Jake-Egan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
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 __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.368191.patch
Type: text/x-patch
Size: 632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210823/85a3130d/attachment.bin>
More information about the llvm-commits
mailing list