1// RUN: %clang_cc1 -w -triple i386-pc-win32 -emit-llvm -o - %s | FileCheck %s
2
3// CHECK-LABEL: define i64 @f1_1()
4// CHECK-LABEL: define void @f1_2(%struct.s1* byval align 4 %a0)
5struct s1 {
6  int a;
7  int b;
8};
9struct s1 f1_1(void) { while (1) {} }
10void f1_2(struct s1 a0) {}
11
12// CHECK-LABEL: define i32 @f2_1()
13struct s2 {
14  short a;
15  short b;
16};
17struct s2 f2_1(void) { while (1) {} }
18
19// CHECK-LABEL: define i16 @f3_1()
20struct s3 {
21  char a;
22  char b;
23};
24struct s3 f3_1(void) { while (1) {} }
25
26// CHECK-LABEL: define i8 @f4_1()
27struct s4 {
28  char a:4;
29  char b:4;
30};
31struct s4 f4_1(void) { while (1) {} }
32
33// CHECK-LABEL: define i64 @f5_1()
34// CHECK-LABEL: define void @f5_2(%struct.s5* byval align 4)
35struct s5 {
36  double a;
37};
38struct s5 f5_1(void) { while (1) {} }
39void f5_2(struct s5 a0) {}
40
41// CHECK-LABEL: define i32 @f6_1()
42// CHECK-LABEL: define void @f6_2(%struct.s6* byval align 4 %a0)
43struct s6 {
44  float a;
45};
46struct s6 f6_1(void) { while (1) {} }
47void f6_2(struct s6 a0) {}
48
49