diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-05-02 19:18:03 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-05-02 19:18:03 +0000 |
commit | 4e3b54b4acb4dd926ca50d7f06c8265d1d24ba79 (patch) | |
tree | 71a9d3c4afa591a0060020139cf92da0794b55fe /test | |
parent | 39b60dc786950e553f5e12fa0e692a33f650a568 (diff) |
Use the Itanium ABI for thread_local on Darwin.
After some discussion, it was decided to use the Itanium ABI for thread_local on
Darwin OS X platforms. This involved a couple of changes. First, we use
"_tlv_atexit" instead of "__cxa_thread_atexit". Secondly, the global variables
are marked with 'internal' linkage, because we want all access to be calls to
the Itanium-specific entry point, which has normal linkage.
<rdar://problem/13733006>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGenCXX/tls-init-funcs.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGenCXX/tls-init-funcs.cpp b/test/CodeGenCXX/tls-init-funcs.cpp new file mode 100644 index 0000000000..17299dcb7b --- /dev/null +++ b/test/CodeGenCXX/tls-init-funcs.cpp @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.8 -std=c++11 -S -emit-llvm %s -o - | FileCheck %s + +// CHECK: @a = internal thread_local global +// CHECK: @_tlv_atexit({{.*}}@_ZN1AD1Ev + +struct A { + ~A(); +}; + +thread_local A a; |