aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System/ThreadLocal.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-07-28 22:49:43 +0000
committerOwen Anderson <resistor@mac.com>2010-07-28 22:49:43 +0000
commit87db45afdeb455c8df940aa69e48e126ab98adef (patch)
treefc9b9ea926dd003f32074b931b87375efd40eced /lib/System/ThreadLocal.cpp
parentcbf6c925a5804e7b492683593e1835ae4da08d61 (diff)
downloadexternal_llvm-87db45afdeb455c8df940aa69e48e126ab98adef.zip
external_llvm-87db45afdeb455c8df940aa69e48e126ab98adef.tar.gz
external_llvm-87db45afdeb455c8df940aa69e48e126ab98adef.tar.bz2
Add an erase() method to llvm::ThreadLocal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/ThreadLocal.cpp')
-rw-r--r--lib/System/ThreadLocal.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/System/ThreadLocal.cpp b/lib/System/ThreadLocal.cpp
index e7054b5..b84a8e7 100644
--- a/lib/System/ThreadLocal.cpp
+++ b/lib/System/ThreadLocal.cpp
@@ -67,6 +67,10 @@ const void* ThreadLocalImpl::getInstance() {
return pthread_getspecific(*key);
}
+void ThreadLocalImpl::removeInstance() {
+ setInstance(0);
+}
+
}
#elif defined(LLVM_ON_UNIX)