[llvm-commits] [llvm] r159210 - /llvm/trunk/lib/Support/ThreadLocal.cpp
Bill Wendling
wendling at apple.com
Tue Jun 26 14:08:03 PDT 2012
On Jun 26, 2012, at 10:13 AM, Argyrios Kyrtzidis wrote:
> Author: akirtzidis
> Date: Tue Jun 26 12:13:58 2012
> New Revision: 159210
>
> URL: http://llvm.org/viewvc/llvm-project?rev=159210&view=rev
> Log:
> Fix ThreadLocalImpl::getInstance for --disable-threads.
>
Fix what? Please be more descriptive in future commit messages. :-)
-bw
> PR13114.
>
> Modified:
> llvm/trunk/lib/Support/ThreadLocal.cpp
>
> Modified: llvm/trunk/lib/Support/ThreadLocal.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/ThreadLocal.cpp?rev=159210&r1=159209&r2=159210&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Support/ThreadLocal.cpp (original)
> +++ llvm/trunk/lib/Support/ThreadLocal.cpp Tue Jun 26 12:13:58 2012
> @@ -30,10 +30,12 @@
> void **pd = reinterpret_cast<void**>(&data);
> *pd = const_cast<void*>(d);
> }
> -const void* ThreadLocalImpl::getInstance() { return data; }
> -void ThreadLocalImpl::removeInstance() {
> +const void* ThreadLocalImpl::getInstance() {
> void **pd = reinterpret_cast<void**>(&data);
> - *pd = 0;
> + return *pd;
> +}
> +void ThreadLocalImpl::removeInstance() {
> + setInstance(0);
> }
> }
> #else
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list