[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Layout / aix-type-align-and-pack-attr.cpp
blobd119511b141f24ae84e9fbca404ab1cdcaf52af5
1 // RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -S -emit-llvm -x c++ < %s | \
2 // RUN: FileCheck %s
4 // RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -S -emit-llvm -x c++ < %s | \
5 // RUN: FileCheck %s
7 namespace test1 {
8 struct __attribute__((__aligned__(2))) S {
9 double d;
12 S s;
14 // CHECK: @{{.*}}test1{{.*}}s{{.*}} = global %"struct.test1::S" zeroinitializer, align 8
15 } // namespace test1
17 namespace test2 {
18 struct __attribute__((__aligned__(2), packed)) S {
19 double d;
22 S s;
24 // CHECK: @{{.*}}test2{{.*}}s{{.*}} = global %"struct.test2::S" zeroinitializer, align 2
25 } // namespace test2
27 namespace test3 {
28 struct __attribute__((__aligned__(16))) S {
29 double d;
32 S s;
34 // CHECK: @{{.*}}test3{{.*}}s{{.*}} = global %"struct.test3::S" zeroinitializer, align 16
35 } // namespace test3
37 namespace test4 {
38 struct __attribute__((aligned(2))) SS {
39 double d;
42 struct S {
43 struct SS ss;
44 } s;
46 // CHECK: @{{.*}}test4{{.*}}s{{.*}} = global %"struct.test4::S" zeroinitializer, align 8
47 } // namespace test4
49 namespace test5 {
50 struct __attribute__((aligned(2), packed)) SS {
51 double d;
54 struct S {
55 struct SS ss;
56 } s;
58 // CHECK: @{{.*}}test5{{.*}}s{{.*}} = global %"struct.test5::S" zeroinitializer, align 2
59 } // namespace test5