mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
Fix ThreadLocalImpl::getInstance for --disable-threads.
PR13114. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
34f5a2b596
commit
da72dd2a01
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user