comparison clang/test/CodeGenCXX/pr18635.cpp @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 1d019706d866
children
comparison
equal deleted inserted replaced
232:70dce7da266c 236:c4bab56944e8
2 2
3 // Global @x: 3 // Global @x:
4 // CHECK: [[X_GLOBAL:@[^ ]+]]{{.*}}thread_local global 4 // CHECK: [[X_GLOBAL:@[^ ]+]]{{.*}}thread_local global
5 5
6 // returned somewhere in TLS wrapper: 6 // returned somewhere in TLS wrapper:
7 // CHECK: ret{{.*}}[[X_GLOBAL]] 7 // CHECK: define {{.+}} ptr @_ZTW1x(
8 // CHECK: [[X_GLOBAL_ADDR:%[^ ]+]] = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 [[X_GLOBAL]])
9 // CHECK: ret{{.*}}[[X_GLOBAL_ADDR]]
8 10
9 template <typename T> class unique_ptr { 11 template <typename T> class unique_ptr {
10 template <typename F, typename S> struct pair { 12 template <typename F, typename S> struct pair {
11 F first; 13 F first;
12 S second; 14 S second;
17 explicit unique_ptr(T *p) noexcept : data() {} 19 explicit unique_ptr(T *p) noexcept : data() {}
18 }; 20 };
19 21
20 thread_local unique_ptr<int> x; 22 thread_local unique_ptr<int> x;
21 int main() { x = unique_ptr<int>(new int(5)); } 23 int main() { x = unique_ptr<int>(new int(5)); }
22