zturner added a comment.

Sad as it may seem, I actually think we may *need* this `LLDB_THREAD_LOCAL` at 
some point in the future.  The reason is that there is at least one place in 
LLDB (I think it might even be in `Timer`, but it's been a while since I found 
this) that relies on thread local destructors.  It is possible to make this 
work on Windows, but the code is absolutely crazy.  You have to use pragmas to 
manually inject magic sections into the binary.  Anyway, this actually works 
using the C++11 `thread_local` keyword under MSVC 2015, so the fact that we 
don't have those semantics on Windows is currently a bug, and the only way I 
know of to get them in a sane manner is to use `thread_local`.

Anyway, TL;DR - If you need Thread Local destructors, you can't use 
`llvm::ThreadLocal`


http://reviews.llvm.org/D13940



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to