1 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.8 -std=c++1y -S -emit-llvm %s -o - | FileCheck %s
3 // CHECK: @a = internal thread_local global
4 // CHECK: @_Z2vtIiE = linkonce_odr thread_local global i32 5
5 // CHECK: @_ZZ3inlvE3loc = linkonce_odr thread_local global i32 0
6 // CHECK: @_tlv_atexit({{.*}}@_ZN1AD1Ev
7 // CHECK: call cxx_fast_tlscc i32* @_ZTW3ext()
8 // CHECK: declare cxx_fast_tlscc i32* @_ZTW3ext()
9 // CHECK: define weak_odr hidden cxx_fast_tlscc i32* @_ZTW2vtIiE()
10 // CHECK: define weak_odr hidden cxx_fast_tlscc i32* @_ZTW2vtIvE()
11 // CHECK: define {{.*}} @_ZTW1a
19 extern thread_local int ext;
20 int &get_ext() { return ext; }
23 thread_local int vt = 5;
25 int get_vt() { return vt<int>; }
31 int &use_inl() { return inl(); }
33 template int vt<void>;
34 int &get_vt_void() { return vt<void>; }