[PATCH] D129369: [SystemZ][z/OS] Force alignment to fix build failure on z/OS

Abhina Sree via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 05:29:48 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6e2329e33ae3: [SystemZ][z/OS] Force alignment to fix build failure on z/OS (authored by abhina.sreeskantharajan).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129369

Files:
  llvm/include/llvm/IR/Metadata.h


Index: llvm/include/llvm/IR/Metadata.h
===================================================================
--- llvm/include/llvm/IR/Metadata.h
+++ llvm/include/llvm/IR/Metadata.h
@@ -951,7 +951,9 @@
   /// The operands are in turn located immediately before the header.
   /// For resizable MDNodes, the space for the storage vector is also allocated
   /// immediately before the header, overlapping with the operands.
-  struct Header {
+  /// Explicity set alignment because bitfields by default have an
+  /// alignment of 1 on z/OS.
+  struct alignas(alignof(size_t)) Header {
     bool IsResizable : 1;
     bool IsLarge : 1;
     size_t SmallSize : 4;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129369.443610.patch
Type: text/x-patch
Size: 659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220711/f05e24c4/attachment.bin>


More information about the llvm-commits mailing list