mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Add an erase() method to llvm::ThreadLocal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109686 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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(); }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user