diff options
author | Hans Wennborg <hans@hanshq.net> | 2012-06-23 11:37:03 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2012-06-23 11:37:03 +0000 |
commit | cbe34b4cc98148b386a0c96cd195e7f62f52a6e3 (patch) | |
tree | bebf420600d6e1edc76ead880c7e5163060e5cde /llvm/lib/Transforms/Utils/CloneModule.cpp | |
parent | 8e00efeacec6aabafb703922b76dbf391b0a900d (diff) | |
download | llvm-cbe34b4cc98148b386a0c96cd195e7f62f52a6e3.zip llvm-cbe34b4cc98148b386a0c96cd195e7f62f52a6e3.tar.gz llvm-cbe34b4cc98148b386a0c96cd195e7f62f52a6e3.tar.bz2 |
Extend the IL for selecting TLS models (PR9788)
This allows the user/front-end to specify a model that is better
than what LLVM would choose by default. For example, a variable
might be declared as
@x = thread_local(initialexec) global i32 42
if it will not be used in a shared library that is dlopen'ed.
If the specified model isn't supported by the target, or if LLVM can
make a better choice, a different model may be used.
llvm-svn: 159077
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneModule.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneModule.cpp b/llvm/lib/Transforms/Utils/CloneModule.cpp index a0e027b..1dac6b5 100644 --- a/llvm/lib/Transforms/Utils/CloneModule.cpp +++ b/llvm/lib/Transforms/Utils/CloneModule.cpp @@ -53,7 +53,7 @@ Module *llvm::CloneModule(const Module *M, ValueToValueMapTy &VMap) { I->isConstant(), I->getLinkage(), (Constant*) 0, I->getName(), (GlobalVariable*) 0, - I->isThreadLocal(), + I->getThreadLocalMode(), I->getType()->getAddressSpace()); GV->copyAttributesFrom(I); VMap[I] = GV; |