1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Fix ThreadLocalImpl::getInstance for --disable-threads.

PR13114.

llvm-svn: 159210
This commit is contained in:
Argyrios Kyrtzidis 2012-06-26 17:13:58 +00:00
parent ee1b7565a6
commit bcb2742394

View File

@ -30,10 +30,12 @@ void ThreadLocalImpl::setInstance(const void* d) {
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