aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/tls-init-funcs.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-12-17[TLS on Darwin] use CXX_FAST_TLS calling convention for access functions.Manman Ren1-4/+4
Also set nounwind attribute. rdar://problem/9001553 llvm-svn: 255860
2015-11-11[TLS on Darwin] change how we handle globals with linkonce or weak linkage.Manman Ren1-3/+3
This is about how we handle static member of a template. Before this commit, we use internal linkage for the IR thread-local variable, which is inefficient. With this commit, we will start to follow Itanium C++ ABI. rdar://problem/23415206 Reviewed by John McCall. llvm-svn: 252814
2014-07-11CodeGen: Don't emit a thread-wrapper if we can't touch the backing variableDavid Majnemer1-2/+25
OS X TLS has all accesses going through the thread-wrapper function and gives the backing thread-local variable internal linkage. This means that thread-wrappers must have WeakAnyLinkage so that references to the internal thread-local variables do not get propagated to other code. It also means that translation units which do not provide a definition for the thread-local variable cannot attempt to emit a thread-wrapper because the thread wrapper will attempt to reference the backing variable. Differential Revision: http://reviews.llvm.org/D4109 llvm-svn: 212841
2014-06-11CodeGen: Correct linkage of thread_local for OS XDavid Majnemer1-0/+1
The backing store of thread local variables is internal for OS X and all accesses must go through the thread wrapper. However, individual TUs may have inlined through the thread wrapper. To fix this, give the thread wrapper functions WeakAnyLinkage. This prevents them from getting inlined into call-sites. This fixes PR19989. llvm-svn: 210632
2013-05-02Use the Itanium ABI for thread_local on Darwin.Bill Wendling1-0/+10
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> llvm-svn: 180941
2013-04-30Revert r180739 and r180748: they broke C++11 thread_local on non-Darwin ↵Richard Smith1-21/+0
systems and did not do the right thing on Darwin. Original commit message: Emit the TLS intialization functions into a list. Add the TLS initialization functions to a list of initialization functions. The back-end takes this list and places the function pointers into the correct section. This way they're called before `main().' <rdar://problem/13733006> llvm-svn: 180809
2013-04-29Modify triple to try to make it pass on ARM.Bill Wendling1-2/+2
llvm-svn: 180748
2013-04-29Emit the TLS intialization functions into a list.Bill Wendling1-0/+21
Add the TLS initialization functions to a list of initialization functions. The back-end takes this list and places the function pointers into the correct section. This way they're called before `main().' <rdar://problem/13733006> llvm-svn: 180739