Home | History | Annotate | Download | only in CodeGen
      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)
      5 struct s1 {
      6   int a;
      7   int b;
      8 };
      9 struct s1 f1_1(void) { while (1) {} }
     10 void f1_2(struct s1 a0) {}
     11 
     12 // CHECK-LABEL: define i32 @f2_1()
     13 struct s2 {
     14   short a;
     15   short b;
     16 };
     17 struct s2 f2_1(void) { while (1) {} }
     18 
     19 // CHECK-LABEL: define i16 @f3_1()
     20 struct s3 {
     21   char a;
     22   char b;
     23 };
     24 struct s3 f3_1(void) { while (1) {} }
     25 
     26 // CHECK-LABEL: define i8 @f4_1()
     27 struct s4 {
     28   char a:4;
     29   char b:4;
     30 };
     31 struct 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)
     35 struct s5 {
     36   double a;
     37 };
     38 struct s5 f5_1(void) { while (1) {} }
     39 void 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)
     43 struct s6 {
     44   float a;
     45 };
     46 struct s6 f6_1(void) { while (1) {} }
     47 void f6_2(struct s6 a0) {}
     48 
     49