summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2012-06-23 11:51:46 +0000
committerHans Wennborg <hans@hanshq.net>2012-06-23 11:51:46 +0000
commitd3b01bc7c6735a78ebdff0071647a15de5716bc7 (patch)
tree1bea08b4886b9dac974ae24ea644795b8b2fd0f6 /clang/lib/CodeGen/CGExprConstant.cpp
parentcbe34b4cc98148b386a0c96cd195e7f62f52a6e3 (diff)
downloadbcm5719-llvm-d3b01bc7c6735a78ebdff0071647a15de5716bc7.tar.gz
bcm5719-llvm-d3b01bc7c6735a78ebdff0071647a15de5716bc7.zip
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. llvm-svn: 159078
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprConstant.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index 854810b310d..97512ad5307 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud