It resolves to thread_local on all platform except for the GPUs on which
it resolves to nothing. The use of thread_local in the source code has been
replaced with the new macro.
Details
Details
- Reviewers
jhuber6 - Commits
- rGdaeee56798c5: [libc] Add macro LIBC_THREAD_LOCAL.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Please have a look at LLVM_THREAD_LOCAL macro in compiler.h. I believe there are two variants.
Comment Actions
I think that's only important for code before C++11. Since we're always compiling with C++17 internally it shouldn't be necessary.
Comment Actions
Should errno.h.def also be updated? It declares:
extern _Thread_local int __llvmlibc_errno;
while the variable is defined in libc_errno.cpp as:
LIBC_THREAD_LOCAL int __llvmlibc_errno;