From 61aeed11cd6cd77e9fc9ce4b5e52bbf81190f4bb Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Thu, 13 May 2010 07:41:57 +0000 Subject: [PATCH] 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 --- lib/Target/CppBackend/CPPBackend.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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); }