[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CodeGen / PowerPC / aix-tls-model.cpp
blob9fdd6855a89ee93ae58dc0195aa3d32bea582ce0
1 // RUN: %clang_cc1 %s -triple powerpc-unknown-aix -target-cpu pwr8 -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-GD
2 // RUN: %clang_cc1 %s -triple powerpc-unknown-aix -target-cpu pwr8 -ftls-model=global-dynamic -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-GD
3 // RUN: not %clang_cc1 %s -triple powerpc-unknown-aix -target-cpu pwr8 -ftls-model=local-dynamic -emit-llvm 2>&1 | FileCheck %s -check-prefix=CHECK-LD-ERROR
4 // RUN: %clang_cc1 %s -triple powerpc-unknown-aix -target-cpu pwr8 -ftls-model=initial-exec -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-IE
5 // RUN: %clang_cc1 %s -triple powerpc-unknown-aix -target-cpu pwr8 -ftls-model=local-exec -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-LE
6 // RUN: %clang_cc1 %s -triple powerpc64-unknown-aix -target-cpu pwr8 -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-GD
7 // RUN: %clang_cc1 %s -triple powerpc64-unknown-aix -target-cpu pwr8 -ftls-model=global-dynamic -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-GD
8 // RUN: not %clang_cc1 %s -triple powerpc64-unknown-aix -target-cpu pwr8 -ftls-model=local-dynamic -emit-llvm 2>&1 | FileCheck %s -check-prefix=CHECK-LD-ERROR
9 // RUN: %clang_cc1 %s -triple powerpc64-unknown-aix -target-cpu pwr8 -ftls-model=initial-exec -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-IE
10 // RUN: %clang_cc1 %s -triple powerpc64-unknown-aix -target-cpu pwr8 -ftls-model=local-exec -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-LE
12 int z1 = 0;
13 int z2;
14 int __thread x;
15 int f() {
16 static int __thread y;
17 return y++;
20 // CHECK-GD: @z1 ={{.*}} global i32 0
21 // CHECK-GD: @z2 ={{.*}} global i32 0
22 // CHECK-GD: @x ={{.*}} thread_local global i32 0
23 // CHECK-GD: @_ZZ1fvE1y = internal thread_local global i32 0
24 // CHECK-LD-ERROR: error: TLS model 'local-dynamic' is not yet supported on AIX
25 // CHECK-IE: @z1 ={{.*}} global i32 0
26 // CHECK-IE: @z2 ={{.*}} global i32 0
27 // CHECK-IE: @x ={{.*}} thread_local(initialexec) global i32 0
28 // CHECK-IE: @_ZZ1fvE1y = internal thread_local(initialexec) global i32 0
29 // CHECK-LE: @z1 ={{.*}} global i32 0
30 // CHECK-LE: @z2 ={{.*}} global i32 0
31 // CHECK-LE: @x ={{.*}} thread_local(localexec) global i32 0
32 // CHECK-LE: @_ZZ1fvE1y = internal thread_local(localexec) global i32 0