From 5e2d5dec7736f6f9292d4212dec67295909f1328 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Sat, 23 Jun 2012 11:51:46 +0000 Subject: Support the tls_model attribute (PR9788) This adds support for the tls_model attribute. This allows the user to choose a TLS model that is better than what LLVM would select by default. For example, a variable might be declared as: __thread int x __attribute__((tls_model("initial-exec"))); if it will not be used in a shared library that is dlopen'ed. This depends on LLVM r159077. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159078 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprConstant.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExprConstant.cpp') diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 854810b310..97512ad530 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -932,7 +932,8 @@ public: C = new llvm::GlobalVariable(CGM.getModule(), C->getType(), E->getType().isConstant(CGM.getContext()), llvm::GlobalValue::InternalLinkage, - C, ".compoundliteral", 0, false, + C, ".compoundliteral", 0, + llvm::GlobalVariable::NotThreadLocal, CGM.getContext().getTargetAddressSpace(E->getType())); return C; } -- cgit v1.2.3-70-g09d2