mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 14:16:07 +00:00

This patch is to fix lit test case failure relate to alignment, on z/OS, maximum alignment value for 64 bit mode is 16 and also fixed clang/test/Layout/itanium-union-bitfield.cpp, attribute ((aligned(4))) is needed for bit-field member in Union for z/OS because single bit-field has one byte alignment, this will make sure size and alignment will be correct value on z/OS. Differential Revision: https://reviews.llvm.org/D98793
14 lines
269 B
C
14 lines
269 B
C
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
|
|
|
|
// CHECK: @foo.p = internal global i8 0, align 16
|
|
char *foo(void) {
|
|
static char p __attribute__((aligned(16)));
|
|
return &p;
|
|
}
|
|
|
|
void bar(long n) {
|
|
// CHECK: align 16
|
|
char p[n] __attribute__((aligned(16)));
|
|
}
|
|
|