LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::sys::ThreadLocal< T > Class Template Reference

ThreadLocal - A class used to abstract thread-local storage. More...

#include "llvm/Support/ThreadLocal.h"

Inheritance diagram for llvm::sys::ThreadLocal< T >:
Inheritance graph
[legend]
Collaboration diagram for llvm::sys::ThreadLocal< T >:
Collaboration graph
[legend]

Public Member Functions

 ThreadLocal ()
 
Tget ()
 get - Fetches a pointer to the object associated with the current thread. More...
 
void set (T *d)
 
void erase ()
 
- Public Member Functions inherited from llvm::sys::ThreadLocalImpl
 ThreadLocalImpl ()
 
virtual ~ThreadLocalImpl ()
 
void setInstance (const void *d)
 
void * getInstance ()
 
void removeInstance ()
 

Detailed Description

template<class T>
class llvm::sys::ThreadLocal< T >

ThreadLocal - A class used to abstract thread-local storage.

It holds, for each thread, a pointer a single object of type T.

Definition at line 46 of file ThreadLocal.h.

Constructor & Destructor Documentation

◆ ThreadLocal()

template<class T>
llvm::sys::ThreadLocal< T >::ThreadLocal ( )
inline

Definition at line 48 of file ThreadLocal.h.

Member Function Documentation

◆ erase()

template<class T>
void llvm::sys::ThreadLocal< T >::erase ( )
inline

Definition at line 58 of file ThreadLocal.h.

References llvm::sys::ThreadLocalImpl::removeInstance().

◆ get()

template<class T>
T* llvm::sys::ThreadLocal< T >::get ( )
inline

get - Fetches a pointer to the object associated with the current thread.

If no object has yet been associated, it returns NULL;

Definition at line 52 of file ThreadLocal.h.

References llvm::sys::ThreadLocalImpl::getInstance().

Referenced by llvm::CrashRecoveryContext::unregisterCleanup().

◆ set()

template<class T>
void llvm::sys::ThreadLocal< T >::set ( T d)
inline

The documentation for this class was generated from the following file: