summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDeclCXX.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-04-29 22:27:16 +0000
committerBill Wendling <isanbard@gmail.com>2013-04-29 22:27:16 +0000
commit96a77693be7cfc87208840b2a367362104c43a6b (patch)
tree7d6ffa862b2d5e6eb4bc135c60e21f970851b9b8 /clang/lib/CodeGen/CGDeclCXX.cpp
parent3e1758c045a440704f70df23acebb08b3036cf45 (diff)
downloadbcm5719-llvm-96a77693be7cfc87208840b2a367362104c43a6b.tar.gz
bcm5719-llvm-96a77693be7cfc87208840b2a367362104c43a6b.zip
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: 180739
Diffstat (limited to 'clang/lib/CodeGen/CGDeclCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGDeclCXX.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDeclCXX.cpp b/clang/lib/CodeGen/CGDeclCXX.cpp
index 9ffcff27662..4d78ea8f3a6 100644
--- a/clang/lib/CodeGen/CGDeclCXX.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud