diff --git a/llvm/include/llvm/IR/Metadata.h b/llvm/include/llvm/IR/Metadata.h --- a/llvm/include/llvm/IR/Metadata.h +++ b/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 { + struct alignas(alignof(size_t)) Header { + // Explicity set alignment on z/OS because bitfields by default + // have an alignment of 1. bool IsResizable : 1; bool IsLarge : 1; size_t SmallSize : 4;