clayborg added a comment. Yes, please use any llvm system utilities when possible. And scratch the need for LLDB_THREAD_LOCAL at any point in the future and just use llvm::ThreadLocal all the time as thread local variables have already been abstracted by llvm. http://reviews.llvm.org/D13940