Pārlūkot izejas kodu

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
Anton Korobeynikov 15 gadi atpakaļ
vecāks
revīzija
61aeed11cd
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      lib/Target/CppBackend/CPPBackend.cpp

+ 5 - 0
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);
     }