// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-nacl -emit-llvm -o - %s| FileCheck %s
// Test for x86-64 structure representation (instead of pnacl representation),
// in particular for unions. Also crib a few tests from x86 Linux.
;
;
// CHECK: define{{.*}} { i64, i64 } @f0()
struct PP_Var
// CHECK-LABEL: define{{.*}} void @f1(i64 %p1.coerce0, i64 %p1.coerce1)
void
// long doubles are 64 bits on NaCl
// CHECK-LABEL: define{{.*}} double @f5()
long double
// CHECK-LABEL: define{{.*}} void @f6(i8 noundef signext %a0, i16 noundef signext %a1, i32 noundef %a2, i64 noundef %a3, i8* noundef %a4)
void
// CHECK-LABEL: define{{.*}} i64 @f8_1()
// CHECK-LABEL: define{{.*}} void @f8_2(i64 %a0.coerce)
;
union u8
void
// CHECK-LABEL: define{{.*}} i64 @f9()
// CHECK-LABEL: define{{.*}} void @f10(i64 %a0.coerce)
;
void
// CHECK-LABEL: define{{.*}} double @f11()
// CHECK-LABEL: define{{.*}} i32 @f12_0()
// CHECK-LABEL: define{{.*}} void @f12_1(i32 %a0.coerce)
;
struct s12
void
// Check that sret parameter is accounted for when checking available integer
// registers.
// CHECK: define{{.*}} void @f13(%struct.s13_0* noalias sret(%struct.s13_0) align 8 %agg.result, i32 noundef %a, i32 noundef %b, i32 noundef %c, i32 noundef %d, {{.*}}* noundef byval({{.*}}) align 8 %e, i32 noundef %f)
;
;
struct s13_0
// CHECK-LABEL: define{{.*}} void @f20(%struct.s20* noundef byval(%struct.s20) align 32 %x)
;
void
// CHECK: declare void @func(i64)
typedef struct _str str;
void ;
str ss;
void