diff options
author | Owen Anderson <resistor@mac.com> | 2010-07-28 22:49:43 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2010-07-28 22:49:43 +0000 |
commit | 87db45afdeb455c8df940aa69e48e126ab98adef (patch) | |
tree | fc9b9ea926dd003f32074b931b87375efd40eced /include | |
parent | cbf6c925a5804e7b492683593e1835ae4da08d61 (diff) | |
download | external_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 'include')
-rw-r--r-- | include/llvm/System/ThreadLocal.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/System/ThreadLocal.h b/include/llvm/System/ThreadLocal.h index 3d44f62..e6edd79 100644 --- a/include/llvm/System/ThreadLocal.h +++ b/include/llvm/System/ThreadLocal.h @@ -28,6 +28,7 @@ namespace llvm { virtual ~ThreadLocalImpl(); void setInstance(const void* d); const void* getInstance(); + void removeInstance(); }; /// ThreadLocal - A class used to abstract thread-local storage. It holds, @@ -43,6 +44,9 @@ namespace llvm { // set - Associates a pointer to an object with the current thread. void set(T* d) { setInstance(d); } + + // erase - Removes the pointer associated with the current thread. + void erase() { removeInstance(); } }; } } |