[LLVMdev] why 'const' void * return for ThreadLocalImpl::getInstance()?

David Majnemer david.majnemer at gmail.com
Thu Dec 11 18:39:19 PST 2014


I think you are supposed to use ThreadLocal::get in cases where you want a
pointer to mutable data:
http://llvm.org/docs/doxygen/html/classllvm_1_1sys_1_1ThreadLocal.html#a66c83dcd38d9048a4f95255e44f13a0c

On Thu, Dec 11, 2014 at 5:49 PM, Andy Ayers <andya at microsoft.com> wrote:

>  I’m probably missing something obvious here, but naively, this makes it
> kind of awkward to have mutable thread local state…
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141211/3f188e47/attachment.html>


More information about the llvm-dev mailing list