Skip to content

Commit 449df96

Browse files
committed
Properly set thread-local flag on globals during cpp emission
llvm-svn: 103702
1 parent 3e7199b commit 449df96

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/Target/CppBackend/CPPBackend.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,11 @@ namespace {
10381038
Out << ");";
10391039
nl(Out);
10401040
}
1041+
if (GV->isThreadLocal()) {
1042+
printCppName(GV);
1043+
Out << "->setThreadLocal(true);";
1044+
nl(Out);
1045+
}
10411046
if (is_inline) {
10421047
out(); Out << "}"; nl(Out);
10431048
}

0 commit comments

Comments
 (0)