mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-25 06:18:56 -04:00

When a struct has bitfields overlapping with other members (as required by the AAPCS), clang uses a packed struct to represent this. If such a struct is large enough for clang to pass it as a byval pointer (>64 bytes), we need to set the alignment of the argument to match the original type. llvm-svn: 203660
15 lines
280 B
C
15 lines
280 B
C
// RUN: %clang_cc1 -triple=armv7-none-eabi < %s -S -emit-llvm | FileCheck %s
|
|
|
|
struct foo {
|
|
long long a;
|
|
char b;
|
|
int c:16;
|
|
int d[16];
|
|
};
|
|
|
|
// CHECK: %struct.foo* byval align 8 %z
|
|
long long bar(int a, int b, int c, int d, int e,
|
|
struct foo z) {
|
|
return z.a;
|
|
}
|