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 59a0d3243b
commit 46785f9461

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