This is an archive of the discontinued LLVM Phabricator instance.

Remove the outdated ThreadLocal class in favor of C++ thread_local.
Needs ReviewPublic

Authored by resistor on Mar 15 2019, 5:13 PM.

Details

Reviewers
mzolotukhin

Diff Detail

Event Timeline

resistor created this revision.Mar 15 2019, 5:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 15 2019, 5:13 PM
resistor changed the repository for this revision from rG LLVM Github Monorepo to rL LLVM.Mar 15 2019, 5:13 PM
resistor updated this revision to Diff 190928.Mar 15 2019, 5:14 PM

Getting the repository right.

resistor updated this revision to Diff 191005.Mar 16 2019, 11:19 PM

Remove unit test for ThreadLocal as well.

resistor updated this revision to Diff 191168.Mar 18 2019, 1:51 PM

Add static

resistor updated this revision to Diff 191169.Mar 18 2019, 1:52 PM

Use static

resistor updated this revision to Diff 191170.Mar 18 2019, 1:53 PM
lebedev.ri added inline comments.
llvm/lib/Support/CrashRecoveryContext.cpp
21

Are you sure thread_local is fully supported by all the compilers that are supported for building LLVM?
It wasn't supported by xcode for some time, maybe the newest version supports it though.

resistor marked an inline comment as done.Mar 19 2019, 8:53 AM
resistor added inline comments.
llvm/lib/Support/CrashRecoveryContext.cpp
21

thread_local support was added in Xcode 8, in 2016: https://asciiwwdc.com/2016/sessions/405#t=354.596

As far as I'm aware, all other supported compiler (GCC, MSVC) had thread_local support earlier than that.

lebedev.ri added inline comments.Mar 22 2019, 10:09 AM
llvm/lib/Support/CrashRecoveryContext.cpp
21

In particular, i would like to see a table of all the compilers that are officially supported by LLVM,
and a yes/no column for thread_local support.

llvm/lib/Support/Windows/ThreadLocal.inc