瀏覽代碼

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 年之前
父節點
當前提交
61aeed11cd
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      lib/Target/CppBackend/CPPBackend.cpp

+ 5 - 0
lib/Target/CppBackend/CPPBackend.cpp

@@ -1038,6 +1038,11 @@ namespace {
       Out << ");";
       Out << ");";
       nl(Out);
       nl(Out);
     }
     }
+    if (GV->isThreadLocal()) {
+      printCppName(GV);
+      Out << "->setThreadLocal(true);";
+      nl(Out);
+    }
     if (is_inline) {
     if (is_inline) {
       out(); Out << "}"; nl(Out);
       out(); Out << "}"; nl(Out);
     }
     }