[PATCH] D108577: [AIX] Suppress -Waix-compat warning with SmallVector class
Jake Egan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 30 08:00:02 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG57b46056b943: [AIX] Suppress -Waix-compat warning with SmallVector class (authored by Jake-Egan).
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 {
+// These structures may cause binary compat warnings on AIX. Suppress the
+// warning since we are only using these types for the static assertions below.
+#if defined(_AIX)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Waix-compat"
+#endif
struct Struct16B {
alignas(16) void *X;
};
struct Struct32B {
alignas(32) void *X;
};
+#if defined(_AIX)
+#pragma GCC diagnostic pop
+#endif
}
static_assert(sizeof(SmallVector<void *, 0>) ==
sizeof(unsigned) * 2 + sizeof(void *),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108577.369447.patch
Type: text/x-patch
Size: 804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210830/bd72e28e/attachment.bin>
More information about the llvm-commits
mailing list