diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-04-28 22:17:59 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-04-28 22:17:59 +0000 |
commit | f5563f573675f1b0b30884185cc52e611e97bd6c (patch) | |
tree | 6c0d74c4d1ca31c07c2830b15b7b7f5d9d7503ea /test/CodeGenCXX/cxx11-thread-local.cpp | |
parent | ec47c9130c83eabfa9460651da30eefeac297f62 (diff) |
CodeGen: Fix linkage of reference temporaries
Summary:
A reference temporary should inherit the linkage of the variable it
initializes. Otherwise, we may hit cases where a reference temporary
wouldn't have the same value in all translation units.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3515
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207451 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/cxx11-thread-local.cpp')
-rw-r--r-- | test/CodeGenCXX/cxx11-thread-local.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/CodeGenCXX/cxx11-thread-local.cpp b/test/CodeGenCXX/cxx11-thread-local.cpp index 86734cd79c..b91f46d5d4 100644 --- a/test/CodeGenCXX/cxx11-thread-local.cpp +++ b/test/CodeGenCXX/cxx11-thread-local.cpp @@ -21,7 +21,7 @@ template<typename T> thread_local int V<T>::m = g(); // CHECK: @e = global i32 0 int e = V<int>::m; -// CHECK: @_ZN1VIiE1mE = weak_odr thread_local global i32 0 +// CHECK: @_ZN1VIiE1mE = linkonce_odr thread_local global i32 0 // CHECK: @_ZZ1fvE1n = internal thread_local global i32 0 @@ -35,9 +35,9 @@ int e = V<int>::m; // CHECK: @_ZZ8tls_dtorvE1u = internal thread_local global // CHECK: @_ZGVZ8tls_dtorvE1u = internal thread_local global i8 0 -// CHECK: @_ZGRZ8tls_dtorvE1u = private thread_local global +// CHECK: @_ZGRZ8tls_dtorvE1u = internal thread_local global -// CHECK: @_ZGVN1VIiE1mE = weak_odr thread_local global i64 0 +// CHECK: @_ZGVN1VIiE1mE = linkonce_odr thread_local global i64 0 // CHECK: @__tls_guard = internal thread_local global i8 0 @@ -46,7 +46,7 @@ int e = V<int>::m; // CHECK: @_ZTH1a = alias void ()* @__tls_init // CHECK: @_ZTHL1d = alias internal void ()* @__tls_init // CHECK: @_ZTHN1U1mE = alias void ()* @__tls_init -// CHECK: @_ZTHN1VIiE1mE = alias weak_odr void ()* @__tls_init +// CHECK: @_ZTHN1VIiE1mE = alias linkonce_odr void ()* @__tls_init // Individual variable initialization functions: |