diff options
Diffstat (limited to 'contrib/llvm/lib/System/ThreadLocal.cpp')
-rw-r--r-- | contrib/llvm/lib/System/ThreadLocal.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/llvm/lib/System/ThreadLocal.cpp b/contrib/llvm/lib/System/ThreadLocal.cpp index e7054b5..f6a55a1 100644 --- a/contrib/llvm/lib/System/ThreadLocal.cpp +++ b/contrib/llvm/lib/System/ThreadLocal.cpp @@ -27,6 +27,7 @@ ThreadLocalImpl::ThreadLocalImpl() { } ThreadLocalImpl::~ThreadLocalImpl() { } void ThreadLocalImpl::setInstance(const void* d) { data = const_cast<void*>(d);} const void* ThreadLocalImpl::getInstance() { return data; } +void ThreadLocalImpl::removeInstance() { data = 0; } } #else @@ -67,6 +68,10 @@ const void* ThreadLocalImpl::getInstance() { return pthread_getspecific(*key); } +void ThreadLocalImpl::removeInstance() { + setInstance(0); +} + } #elif defined(LLVM_ON_UNIX) |