From: Anton Korobeynikov Date: Thu, 13 May 2010 07:41:57 +0000 (+0000) Subject: Properly set thread-local flag on globals during cpp emission X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=61aeed11cd6cd77e9fc9ce4b5e52bbf81190f4bb;p=oota-llvm.git Properly set thread-local flag on globals during cpp emission git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103702 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index 28345b29379..45a0c84a4f0 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -1038,6 +1038,11 @@ namespace { Out << ");"; nl(Out); } + if (GV->isThreadLocal()) { + printCppName(GV); + Out << "->setThreadLocal(true);"; + nl(Out); + } if (is_inline) { out(); Out << "}"; nl(Out); }