]> granicus.if.org Git - clang/commit
CodeGen: Correct linkage of thread_local for OS X
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 11 Jun 2014 04:08:55 +0000 (04:08 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 11 Jun 2014 04:08:55 +0000 (04:08 +0000)
commitf64ce123281c6b9084542db29ab776ad65d7f1f2
tree25edbe11548e3c2f389a72998ad4619e8b1c15a4
parent1441ef575a2635e6a6f53e7681f3d92e0573d238
CodeGen: Correct linkage of thread_local for OS X

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210632 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ASTContext.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/ItaniumCXXABI.cpp
test/CodeGenCXX/tls-init-funcs.cpp