[PATCH] D108577: [AIX] Avoid -Waix-compat warning with SmallVector class

Jake Egan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 26 11:10:09 PDT 2021


Jake-Egan updated this revision to Diff 368936.
Jake-Egan added a comment.

Suppress -Waix-compat warning


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,19 @@
 
 // Check that no bytes are wasted and everything is well-aligned.
 namespace {
+#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.368936.patch
Type: text/x-patch
Size: 648 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210826/6e0163d6/attachment.bin>


More information about the llvm-commits mailing list