[LLVMdev] ThreadLocal and constness

Stephen Crane sjcrane at uci.edu
Thu Oct 3 16:57:07 PDT 2013


I'm trying to use the Support/ThreadLocal class, and I'm having some 
trouble because ThreadLocalImpl::getInstance returns a const void*, 
which I would like to be able to modify. Is there any particular reason 
this returns a const pointer rather than simply a void pointer? Pthreads 
and the Windows TLS API both seem to return plain void*.

If there's no particular reason for this, could this be patched to not 
be const?

Thanks,
Stephen



More information about the llvm-dev mailing list