[lldb] Simplify HostThreadMacOSX
The class is using an incredibly elaborate setup to create and destroy an NSAutoreleasePool object. We can do it in a much simpler way by making those calls inside our thread startup function. The only effect of this patch is that the pool gets released at the end of the ThreadCreateTrampoline function, instead of slightly later, when pthreads begin thread-specific cleanup. However, the key destruction order is unspecified, so nothing should be relying on that. I didn't find a specific reason for why this would have to be done that way in git history. It seems that before D5198, this was thread-specific keys were the only way an os implementation (in Host::ThreadCreated) could attach some value to a thread. Differential Revision: https://reviews.llvm.org/D120322
Loading
Please sign in to comment