diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-04-29 22:27:16 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-04-29 22:27:16 +0000 |
commit | 7c6b7ba5f5410d4b552ee53c60d0690522c99959 (patch) | |
tree | c45ba694fd5902138b6f7b76d9665327513b6373 /lib/CodeGen/CGDeclCXX.cpp | |
parent | d237d2e6b85a74f31c986dc585fa6c39733b74a2 (diff) |
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>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180739 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDeclCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGDeclCXX.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDeclCXX.cpp b/lib/CodeGen/CGDeclCXX.cpp index 9ffcff2766..4d78ea8f3a 100644 --- a/lib/CodeGen/CGDeclCXX.cpp +++ b/lib/CodeGen/CGDeclCXX.cpp @@ -304,6 +304,7 @@ void CodeGenModule::EmitCXXThreadLocalInitFunc() { Guard->setThreadLocal(true); CodeGenFunction(*this) .GenerateCXXGlobalInitFunc(InitFn, CXXThreadLocalInits, Guard); + AddTLSInitFunc(InitFn); } getCXXABI().EmitThreadLocalInitFuncs(CXXThreadLocals, InitFn); |