summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-04-14 23:01:42 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-04-14 23:01:42 +0000
commitdbf74baee576ba200009bcead0117cc641d39071 (patch)
tree98577d678a6974765c016c31024abc4ee444b2d8 /clang/lib/CodeGen/CodeGenModule.cpp
parente45f58d8a90c2e9fbf4cf46dcf29f27e0deb3077 (diff)
downloadbcm5719-llvm-dbf74baee576ba200009bcead0117cc641d39071.tar.gz
bcm5719-llvm-dbf74baee576ba200009bcead0117cc641d39071.zip
CodeGen support for function-local static thread_local variables with
non-constant constructors or non-trivial destructors. Plus bugfixes for thread_local references bound to temporaries (the temporaries themselves are lifetime-extended to become thread_local), and the corresponding case for std::initializer_list. llvm-svn: 179496
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 20532d68c9e..f8627b2b70d 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1627,6 +1627,7 @@ CodeGenModule::MaybeEmitGlobalStdInitializerListInitializer(const VarDecl *D,
D->getLocStart(), D->getLocation(),
name, arrayType, sourceInfo,
SC_Static);
+ backingArray->setTLSKind(D->getTLSKind());
// Now clone the InitListExpr to initialize the array instead.
// Incredible hack: we want to use the existing InitListExpr here, so we need
OpenPOWER on IntegriCloud