[Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (#113470)
[llvm-project.git] / clang / test / CodeGenCXX / cxx11-thread-local-visibility.cpp
blobfb64f8068a848672a11e77d64dbeaf8dd0f4ced1
1 // RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck --check-prefix=LINUX_AIX %s
2 // RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple powerpc64-unknown-aix-xcoff | FileCheck --check-prefix=LINUX_AIX %s
3 // RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple x86_64-apple-darwin12 | FileCheck --check-prefix=DARWIN %s
5 // Regression test for PR40327
7 // LINUX_AIX: @default_tls ={{.*}} thread_local global i32
8 // LINUX_AIX: @hidden_tls ={{( hidden)?}} thread_local global i32
9 // LINUX_AIX: define weak_odr hidden noundef ptr @_ZTW11default_tls()
10 // LINUX_AIX: define weak_odr hidden noundef ptr @_ZTW10hidden_tls()
12 // DARWIN: @default_tls = internal thread_local global i32
13 // DARWIN: @hidden_tls = internal thread_local global i32
14 // DARWIN: define cxx_fast_tlscc noundef ptr @_ZTW11default_tls()
15 // DARWIN: define hidden cxx_fast_tlscc noundef ptr @_ZTW10hidden_tls()
17 __attribute__((visibility("default"))) thread_local int default_tls;
18 __attribute__((visibility("hidden"))) thread_local int hidden_tls;