xref: /aosp_15_r20/external/clang/test/CodeGen/ms_struct.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -triple i386-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
2*67e74705SXin Li 
3*67e74705SXin Li #define ATTR __attribute__((__ms_struct__))
4*67e74705SXin Li struct s1 {
5*67e74705SXin Li   int       f32;
6*67e74705SXin Li   long long f64;
7*67e74705SXin Li } ATTR s1;
8*67e74705SXin Li 
9*67e74705SXin Li // CHECK: %struct.s1 = type { i32, [4 x i8], i64 }
10*67e74705SXin Li 
11*67e74705SXin Li struct s2 {
12*67e74705SXin Li   int       f32;
13*67e74705SXin Li   long long f64[4];
14*67e74705SXin Li } ATTR s2;
15*67e74705SXin Li 
16*67e74705SXin Li // CHECK: %struct.s2 = type { i32, [4 x i8], [4 x i64] }
17*67e74705SXin Li 
18*67e74705SXin Li struct s3 {
19*67e74705SXin Li   int       f32;
20*67e74705SXin Li   struct s1 s;
21*67e74705SXin Li } ATTR s3;
22*67e74705SXin Li 
23*67e74705SXin Li // CHECK: %struct.s3 = type { i32, [4 x i8], %struct.s1 }
24