1 // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck --check-prefixes=CHECK,LINUX,LINUX_AIX %s
2 // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -O2 -disable-llvm-passes -o - -triple x86_64-linux-gnu | FileCheck --check-prefixes=CHECK,LINUX,LINUX_AIX,CHECK-OPT %s
3 // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -femulated-tls -emit-llvm %s -o - \
4 // RUN: -triple x86_64-linux-gnu 2>&1 | FileCheck --check-prefixes=CHECK,LINUX,LINUX_AIX %s
5 // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple x86_64-apple-darwin12 | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %s
6 // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple powerpc64-unknown-aix-xcoff | FileCheck --check-prefixes=CHECK,AIX,LINUX_AIX %s
7
8 // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fno-use-cxa-atexit -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck --check-prefixes=CHECK,LINUX,LINUX_AIX %s
9 // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fno-use-cxa-atexit -emit-llvm %s -O2 -disable-llvm-passes -o - -triple x86_64-linux-gnu | FileCheck --check-prefixes=CHECK,LINUX,LINUX_AIX,CHECK-OPT %s
10 // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fno-use-cxa-atexit -femulated-tls -emit-llvm %s -o - \
11 // RUN: -triple x86_64-linux-gnu 2>&1 | FileCheck --check-prefixes=CHECK,LINUX,LINUX_AIX %s
12 // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fno-use-cxa-atexit -emit-llvm %s -o - -triple x86_64-apple-darwin12 | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %s
13
14 int f();
15 int g();
16
17 // LINUX_AIX-DAG: @a ={{.*}} thread_local global i32 0
18 // DARWIN-DAG: @a = internal thread_local global i32 0
19 thread_local int a = f();
20 extern thread_local int b;
21 // CHECK-DAG: @c ={{.*}} global i32 0
22 int c = b;
23 // CHECK-DAG: @_ZL1d = internal thread_local global i32 0
24 static thread_local int d = g();
25
26 struct U { static thread_local int m; };
27 // LINUX_AIX-DAG: @_ZN1U1mE ={{.*}} thread_local global i32 0
28 // DARWIN-DAG: @_ZN1U1mE = internal thread_local global i32 0
29 thread_local int U::m = f();
30
31 namespace MismatchedInitType {
32 // Check that we don't crash here when we're forced to create a new global
33 // variable (with a different type) when we add the initializer.
34 union U {
35 int a;
36 float f;
U()37 constexpr U() : f(0.0) {}
38 };
39 static thread_local U u;
40 void *p = &u;
41 }
42
43 template<typename T> struct V { static thread_local int m; };
44 template<typename T> thread_local int V<T>::m = g();
45
46 template<typename T> struct W { static thread_local int m; };
47 template<typename T> thread_local int W<T>::m = 123;
48
49 struct Dtor { ~Dtor(); };
50 template<typename T> struct X { static thread_local Dtor m; };
51 template<typename T> thread_local Dtor X<T>::m;
52
53 // CHECK-DAG: @e ={{.*}} global
54 void *e = V<int>::m + W<int>::m + &X<int>::m;
55
56 template thread_local int V<float>::m;
57 template thread_local int W<float>::m;
58 template thread_local Dtor X<float>::m;
59
60 extern template thread_local int V<char>::m;
61 extern template thread_local int W<char>::m;
62 extern template thread_local Dtor X<char>::m;
63
64 void *e2 = V<char>::m + W<char>::m + &X<char>::m;
65
66 // CHECK-DAG: @_ZN1VIiE1mE = linkonce_odr thread_local global i32 0
67 // CHECK-DAG: @_ZN1WIiE1mE = linkonce_odr thread_local global i32 123
68 // CHECK-DAG: @_ZN1XIiE1mE = linkonce_odr thread_local global {{.*}}
69 // CHECK-DAG: @_ZN1VIfE1mE = weak_odr thread_local global i32 0
70 // CHECK-DAG: @_ZN1WIfE1mE = weak_odr thread_local global i32 123
71 // CHECK-DAG: @_ZN1XIfE1mE = weak_odr thread_local global {{.*}}
72
73 // CHECK-DAG: @_ZZ1fvE1n = internal thread_local global i32 0
74
75 // CHECK-DAG: @_ZGVZ1fvE1n = internal thread_local global i8 0
76
77 // CHECK-DAG: @_ZZ8tls_dtorvE1s = internal thread_local global
78 // CHECK-DAG: @_ZGVZ8tls_dtorvE1s = internal thread_local global i8 0
79
80 // CHECK-DAG: @_ZZ8tls_dtorvE1t = internal thread_local global
81 // CHECK-DAG: @_ZGVZ8tls_dtorvE1t = internal thread_local global i8 0
82
83 // CHECK-DAG: @_ZZ8tls_dtorvE1u = internal thread_local global
84 // CHECK-DAG: @_ZGVZ8tls_dtorvE1u = internal thread_local global i8 0
85 // CHECK-DAG: @_ZGRZ8tls_dtorvE1u_ = internal thread_local global
86
87 // CHECK-DAG: @_ZGVN1VIiE1mE = linkonce_odr thread_local global i64 0
88
89 // CHECK-DAG: @__tls_guard = internal thread_local global i8 0
90
91 // CHECK-DAG: @llvm.global_ctors = appending global {{.*}} @[[GLOBAL_INIT:[^ ]*]]
92
93 // LINUX_AIX-DAG: @_ZTH1a ={{.*}} alias void (), void ()* @__tls_init
94 // DARWIN-DAG: @_ZTH1a = internal alias void (), void ()* @__tls_init
95 // LINUX_AIX-DAG: @_ZTHN1U1mE ={{.*}} alias void (), void ()* @__tls_init
96 // DARWIN-DAG: @_ZTHN1U1mE = internal alias void (), void ()* @__tls_init
97 // CHECK-DAG: @_ZTHN1VIiE1mE = linkonce_odr alias void (), void ()* @[[V_M_INIT:[^, ]*]]
98 // CHECK-DAG: @_ZTHN1XIiE1mE = linkonce_odr alias void (), void ()* @[[X_M_INIT:[^, ]*]]
99 // CHECK-DAG: @_ZTHN1VIfE1mE = weak_odr alias void (), void ()* @[[VF_M_INIT:[^, ]*]]
100 // CHECK-DAG: @_ZTHN1XIfE1mE = weak_odr alias void (), void ()* @[[XF_M_INIT:[^, ]*]]
101 // FIXME: We really want a CHECK-DAG-NOT for these.
102 // CHECK-NOT: @_ZTHN1WIiE1mE =
103 // CHECK-NOT: @_ZTHN1WIfE1mE =
104 // CHECK-NOT: @_ZTHL1d =
105
106
107 // Individual variable initialization functions:
108
109 // CHECK: define {{.*}} @[[A_INIT:.*]]()
110 // CHECK: call{{.*}} i32 @_Z1fv()
111 // CHECK-NEXT: store i32 {{.*}}, i32* @a, align 4
112
113 // CHECK-LABEL: define{{.*}} i32 @_Z1fv()
f()114 int f() {
115 // CHECK: %[[GUARD:.*]] = load i8, i8* @_ZGVZ1fvE1n, align 1
116 // CHECK: %[[NEED_INIT:.*]] = icmp eq i8 %[[GUARD]], 0
117 // CHECK: br i1 %[[NEED_INIT]]{{.*}}
118
119 // CHECK: %[[CALL:.*]] = call{{.*}} i32 @_Z1gv()
120 // CHECK: store i32 %[[CALL]], i32* @_ZZ1fvE1n, align 4
121 // CHECK: store i8 1, i8* @_ZGVZ1fvE1n
122 // CHECK: br label
123 static thread_local int n = g();
124
125 // CHECK: load i32, i32* @_ZZ1fvE1n, align 4
126 return n;
127 }
128
129 // CHECK: define {{.*}} @[[C_INIT:.*]]()
130 // LINUX_AIX: call i32* @_ZTW1b()
131 // DARWIN: call cxx_fast_tlscc i32* @_ZTW1b()
132 // CHECK-NEXT: load i32, i32* %{{.*}}, align 4
133 // CHECK-NEXT: store i32 %{{.*}}, i32* @c, align 4
134
135 // LINUX_AIX-LABEL: define linkonce_odr hidden noundef i32* @_ZTW1b()
136 // LINUX: br i1 icmp ne (void ()* @_ZTH1b, void ()* null),
137 // AIX-NOT: br i1 icmp ne (void ()* @_ZTH1b, void ()* null),
138 // not null:
139 // LINUX_AIX: call void @_ZTH1b()
140 // LINUX: br label
141 // AIX-NOT: br label
142 // finally:
143 // LINUX_AIX: ret i32* @b
144 // DARWIN-LABEL: declare cxx_fast_tlscc noundef i32* @_ZTW1b()
145 // There is no definition of the thread wrapper on Darwin for external TLV.
146
147 // CHECK: define {{.*}} @[[D_INIT:.*]]()
148 // CHECK: call{{.*}} i32 @_Z1gv()
149 // CHECK-NEXT: store i32 %{{.*}}, i32* @_ZL1d, align 4
150
151 // CHECK: define {{.*}} @[[U_M_INIT:.*]]()
152 // CHECK: call{{.*}} i32 @_Z1fv()
153 // CHECK-NEXT: store i32 %{{.*}}, i32* @_ZN1U1mE, align 4
154
155 // CHECK: define {{.*}} @[[E_INIT:.*]]()
156 // LINUX_AIX: call i32* @_ZTWN1VIiE1mE()
157 // DARWIN: call cxx_fast_tlscc i32* @_ZTWN1VIiE1mE()
158 // CHECK-NEXT: load i32, i32* %{{.*}}, align 4
159 // LINUX_AIX: call {{.*}}* @_ZTWN1XIiE1mE()
160 // DARWIN: call cxx_fast_tlscc {{.*}}* @_ZTWN1XIiE1mE()
161 // CHECK: store {{.*}} @e
162
163 // LINUX_AIX-LABEL: define weak_odr hidden noundef i32* @_ZTWN1VIiE1mE()
164 // DARWIN-LABEL: define weak_odr hidden cxx_fast_tlscc noundef i32* @_ZTWN1VIiE1mE()
165 // LINUX_AIX: call void @_ZTHN1VIiE1mE()
166 // DARWIN: call cxx_fast_tlscc void @_ZTHN1VIiE1mE()
167 // CHECK: ret i32* @_ZN1VIiE1mE
168
169 // LINUX_AIX-LABEL: define weak_odr hidden noundef i32* @_ZTWN1WIiE1mE()
170 // DARWIN-LABEL: define weak_odr hidden cxx_fast_tlscc noundef i32* @_ZTWN1WIiE1mE()
171 // CHECK-NOT: call
172 // CHECK: ret i32* @_ZN1WIiE1mE
173
174 // LINUX_AIX-LABEL: define weak_odr hidden {{.*}}* @_ZTWN1XIiE1mE()
175 // DARWIN-LABEL: define weak_odr hidden cxx_fast_tlscc {{.*}}* @_ZTWN1XIiE1mE()
176 // LINUX_AIX: call void @_ZTHN1XIiE1mE()
177 // DARWIN: call cxx_fast_tlscc void @_ZTHN1XIiE1mE()
178 // CHECK: ret {{.*}}* @_ZN1XIiE1mE
179
180 // LINUX_AIX: define internal void @[[VF_M_INIT]]()
181 // DARWIN: define internal cxx_fast_tlscc void @[[VF_M_INIT]]()
182 // CHECK-NOT: comdat
183 // CHECK: load i8, i8* bitcast (i64* @_ZGVN1VIfE1mE to i8*)
184 // CHECK: %[[VF_M_INITIALIZED:.*]] = icmp eq i8 %{{.*}}, 0
185 // CHECK: br i1 %[[VF_M_INITIALIZED]],
186 // need init:
187 // CHECK: call{{.*}} i32 @_Z1gv()
188 // CHECK: store i32 %{{.*}}, i32* @_ZN1VIfE1mE, align 4
189 // CHECK: store i8 1, i8* bitcast (i64* @_ZGVN1VIfE1mE to i8*)
190 // CHECK: br label
191
192 // LINUX_AIX: define internal void @[[XF_M_INIT]]()
193 // DARWIN: define internal cxx_fast_tlscc void @[[XF_M_INIT]]()
194 // CHECK-NOT: comdat
195 // CHECK: load i8, i8* bitcast (i64* @_ZGVN1XIfE1mE to i8*)
196 // CHECK: %[[XF_M_INITIALIZED:.*]] = icmp eq i8 %{{.*}}, 0
197 // CHECK: br i1 %[[XF_M_INITIALIZED]],
198 // need init:
199 // AIX-NOT: br
200 // LINUX: call {{.*}}__cxa_thread_atexit
201 // AIX: call {{.*}}__pt_atexit_np
202 // DARWIN: call {{.*}}_tlv_atexit
203 // CHECK: store i8 1, i8* bitcast (i64* @_ZGVN1XIfE1mE to i8*)
204 // CHECK: br label
205
206 // LINUX: declare i32 @__cxa_thread_atexit(void (i8*)*, i8*, i8*)
207 // AIX: declare i32 @__pt_atexit_np(i32, i32 (i32, ...)*, ...)
208 // DARWIN: declare i32 @_tlv_atexit(void (i8*)*, i8*, i8*)
209
210 // DARWIN: declare cxx_fast_tlscc noundef i32* @_ZTWN1VIcE1mE()
211 // LINUX_AIX: define linkonce_odr hidden noundef i32* @_ZTWN1VIcE1mE() {{#[0-9]+}}{{( comdat)?}} {
212 // LINUX: br i1 icmp ne (void ()* @_ZTHN1VIcE1mE,
213 // AIX-NOT: br i1 icmp ne (void ()* @_ZTHN1VIcE1mE
214 // LINUX_AIX: call void @_ZTHN1VIcE1mE()
215 // LINUX_AIX: ret i32* @_ZN1VIcE1mE
216
217 // DARWIN: declare cxx_fast_tlscc noundef i32* @_ZTWN1WIcE1mE()
218 // LINUX_AIX: define linkonce_odr hidden noundef i32* @_ZTWN1WIcE1mE() {{#[0-9]+}}{{( comdat)?}} {
219 // LINUX: br i1 icmp ne (void ()* @_ZTHN1WIcE1mE,
220 // AIX-NOT: br i1 icmp ne (void ()* @_ZTHN1WIcE1mE,
221 // LINUX_AIX: call void @_ZTHN1WIcE1mE()
222 // LINUX_AIX: ret i32* @_ZN1WIcE1mE
223
224 // DARWIN: declare cxx_fast_tlscc {{.*}}* @_ZTWN1XIcE1mE()
225 // LINUX_AIX: define linkonce_odr hidden {{.*}}* @_ZTWN1XIcE1mE() {{#[0-9]+}}{{( comdat)?}} {
226 // LINUX: br i1 icmp ne (void ()* @_ZTHN1XIcE1mE,
227 // AIX-NOT: br i1 icmp ne (void ()* @_ZTHN1XIcE1mE,
228 // LINUX_AIX: call void @_ZTHN1XIcE1mE()
229 // LINUX_AIX: ret {{.*}}* @_ZN1XIcE1mE
230
231 struct S { S(); ~S(); };
232 struct T { ~T(); };
233
234 // CHECK-LABEL: define{{.*}} void @_Z8tls_dtorv()
tls_dtor()235 void tls_dtor() {
236 // CHECK: load i8, i8* @_ZGVZ8tls_dtorvE1s
237 // CHECK: call void @_ZN1SC1Ev(%struct.S* {{[^,]*}} @_ZZ8tls_dtorvE1s)
238 // LINUX: call i32 @__cxa_thread_atexit({{.*}}@_ZN1SD1Ev {{.*}} @_ZZ8tls_dtorvE1s{{.*}} @__dso_handle
239 // AIX: call i32 (i32, i32 (i32, ...)*, ...) @__pt_atexit_np(i32 0, {{.*}}@__dtor__ZZ8tls_dtorvE1s){{.*}}
240 // DARWIN: call i32 @_tlv_atexit({{.*}}@_ZN1SD1Ev {{.*}} @_ZZ8tls_dtorvE1s{{.*}} @__dso_handle
241 // CHECK: store i8 1, i8* @_ZGVZ8tls_dtorvE1s
242 static thread_local S s;
243
244 // CHECK: load i8, i8* @_ZGVZ8tls_dtorvE1t
245 // CHECK-NOT: _ZN1T
246 // LINUX: call i32 @__cxa_thread_atexit({{.*}}@_ZN1TD1Ev {{.*}}@_ZZ8tls_dtorvE1t{{.*}} @__dso_handle
247 // AIX: call i32 (i32, i32 (i32, ...)*, ...) @__pt_atexit_np(i32 0, {{.*}}@__dtor__ZZ8tls_dtorvE1t){{.*}}
248 // DARWIN: call i32 @_tlv_atexit({{.*}}@_ZN1TD1Ev {{.*}}@_ZZ8tls_dtorvE1t{{.*}} @__dso_handle
249 // CHECK: store i8 1, i8* @_ZGVZ8tls_dtorvE1t
250 static thread_local T t;
251
252 // CHECK: load i8, i8* @_ZGVZ8tls_dtorvE1u
253 // CHECK: call void @_ZN1SC1Ev(%struct.S* {{[^,]*}} @_ZGRZ8tls_dtorvE1u_)
254 // LINUX: call i32 @__cxa_thread_atexit({{.*}}@_ZN1SD1Ev {{.*}} @_ZGRZ8tls_dtorvE1u_{{.*}} @__dso_handle
255 // AIX: call i32 (i32, i32 (i32, ...)*, ...) @__pt_atexit_np(i32 0, {{.*}}__dtor__ZZ8tls_dtorvE1u){{.*}}
256 // DARWIN: call i32 @_tlv_atexit({{.*}}@_ZN1SD1Ev {{.*}} @_ZGRZ8tls_dtorvE1u_{{.*}} @__dso_handle
257 // CHECK: store i8 1, i8* @_ZGVZ8tls_dtorvE1u
258 static thread_local const S &u = S();
259 }
260
261 // AIX: define {{.*}}@__dtor__ZZ8tls_dtorvE1s(i32 noundef signext %0, ...){{.*}}{
262 // AIX: entry:
263 // AIX: %.addr = alloca i32, align 4
264 // AIX: store i32 %0, i32* %.addr, align 4
265 // AIX: call void @_ZN1SD1Ev(%struct.S* @_ZZ8tls_dtorvE1s)
266 // AIX: ret i32 0
267 // AIX: }
268
269 // AIX: define {{.*}}@__dtor__ZZ8tls_dtorvE1t(i32 noundef signext %0, ...){{.*}}{
270 // AIX: entry:
271 // AIX: %.addr = alloca i32, align 4
272 // AIX: store i32 %0, i32* %.addr, align 4
273 // AIX: call void @_ZN1TD1Ev(%struct.T* @_ZZ8tls_dtorvE1t)
274 // AIX: ret i32 0
275 // AIX: }
276
277 // AIX: define {{.*}}@__dtor__ZZ8tls_dtorvE1u(i32 noundef signext %0, ...){{.*}}{
278 // AIX: entry:
279 // AIX: %.addr = alloca i32, align 4
280 // AIX: store i32 %0, i32* %.addr, align 4
281 // AIX: call void @_ZN1SD1Ev(%struct.S* @_ZGRZ8tls_dtorvE1u_)
282 // AIX: ret i32 0
283 // AIX: }
284
285 // CHECK: define {{.*}} @_Z7PR15991v(
PR15991()286 int PR15991() {
287 thread_local int n;
288 auto l = [] { return n; };
289 return l();
290 }
291
292 struct PR19254 {
293 static thread_local int n;
294 int f();
295 };
296 // CHECK: define {{.*}} @_ZN7PR192541fEv(
f()297 int PR19254::f() {
298 // LINUX_AIX: call void @_ZTHN7PR192541nE(
299 // DARWIN: call cxx_fast_tlscc i32* @_ZTWN7PR192541nE(
300 return this->n;
301 }
302
303 namespace {
304 thread_local int anon_i{f()};
305 }
set_anon_i()306 void set_anon_i() {
307 anon_i = 2;
308 }
309 // LINUX_AIX-LABEL: define internal noundef i32* @_ZTWN12_GLOBAL__N_16anon_iE()
310 // DARWIN-LABEL: define internal cxx_fast_tlscc noundef i32* @_ZTWN12_GLOBAL__N_16anon_iE()
311
312 // LINUX_AIX: define internal void @[[V_M_INIT]]()
313 // DARWIN: define internal cxx_fast_tlscc void @[[V_M_INIT]]()
314 // CHECK-NOT: comdat
315 // CHECK: load i8, i8* bitcast (i64* @_ZGVN1VIiE1mE to i8*)
316 // CHECK: %[[V_M_INITIALIZED:.*]] = icmp eq i8 %{{.*}}, 0
317 // CHECK: br i1 %[[V_M_INITIALIZED]],
318 // need init:
319 // CHECK: call{{.*}} i32 @_Z1gv()
320 // CHECK: store i32 %{{.*}}, i32* @_ZN1VIiE1mE, align 4
321 // CHECK: store i8 1, i8* bitcast (i64* @_ZGVN1VIiE1mE to i8*)
322 // CHECK: br label
323
324 // LINUX_AIX: define internal void @[[X_M_INIT]]()
325 // DARWIN: define internal cxx_fast_tlscc void @[[X_M_INIT]]()
326 // CHECK-NOT: comdat
327 // CHECK: load i8, i8* bitcast (i64* @_ZGVN1XIiE1mE to i8*)
328 // CHECK: %[[X_M_INITIALIZED:.*]] = icmp eq i8 %{{.*}}, 0
329 // CHECK: br i1 %[[X_M_INITIALIZED]],
330 // need init:
331 // LINUX: call {{.*}}__cxa_thread_atexit
332 // AIX: call {{.*}}__pt_atexit_np
333 // DARWIN: call {{.*}}_tlv_atexit
334 // CHECK: store i8 1, i8* bitcast (i64* @_ZGVN1XIiE1mE to i8*)
335 // CHECK: br label
336
337 // CHECK: define {{.*}}@[[GLOBAL_INIT:.*]]()
338 // CHECK: call void @[[C_INIT]]()
339 // CHECK: call void @[[E_INIT]]()
340
341
342 // CHECK: define {{.*}}@__tls_init()
343 // CHECK: load i8, i8* @__tls_guard
344 // CHECK: %[[NEED_TLS_INIT:.*]] = icmp eq i8 %{{.*}}, 0
345 // CHECK: br i1 %[[NEED_TLS_INIT]],
346 // init:
347 // CHECK: store i8 1, i8* @__tls_guard
348 // CHECK-OPT: call {}* @llvm.invariant.start.p0i8(i64 1, i8* @__tls_guard)
349 // CHECK-NOT: call void @[[V_M_INIT]]()
350 // CHECK: call void @[[A_INIT]]()
351 // CHECK-NOT: call void @[[V_M_INIT]]()
352 // CHECK: call void @[[D_INIT]]()
353 // CHECK-NOT: call void @[[V_M_INIT]]()
354 // CHECK: call void @[[U_M_INIT]]()
355 // CHECK-NOT: call void @[[V_M_INIT]]()
356
357
358 // LINUX_AIX: define weak_odr hidden noundef i32* @_ZTW1a()
359 // DARWIN: define cxx_fast_tlscc noundef i32* @_ZTW1a()
360 // LINUX_AIX: call void @_ZTH1a()
361 // DARWIN: call cxx_fast_tlscc void @_ZTH1a()
362 // CHECK: ret i32* @a
363 // CHECK: }
364
365
366 // Should not emit a thread wrapper for internal-linkage unused variable 'd'.
367 // We separately check that 'd' does in fact get initialized with the other
368 // thread-local variables in this TU.
369 // CHECK-NOT: define {{.*}} @_ZTWL1d()
370
371 // LINUX_AIX-LABEL: define weak_odr hidden noundef i32* @_ZTWN1U1mE()
372 // DARWIN-LABEL: define cxx_fast_tlscc noundef i32* @_ZTWN1U1mE()
373 // LINUX_AIX: call void @_ZTHN1U1mE()
374 // DARWIN: call cxx_fast_tlscc void @_ZTHN1U1mE()
375 // CHECK: ret i32* @_ZN1U1mE
376
377 // LINUX_AIX: declare extern_weak void @_ZTH1b() [[ATTR:#[0-9]+]]
378
379 // AIX: define linkonce_odr void @_ZTHN1WIiE1mE(){{.*}} {
380 // AIX-NEXT: ret void
381 // AIX-NEXT: }
382 // CHECK-NOT: @_ZTHN1WIfE1mE =
383 // AIX: define weak_odr void @_ZTHN1WIfE1mE(){{.*}} {
384 // AIX-NEXT: ret void
385 // AIX-NEXT: }
386
387 // LINUX_AIX: attributes [[ATTR]] = { {{.+}} }
388