LLVM  9.0.0svn
Classes | Public Member Functions | List of all members
llvm::orc::ThreadSafeContext Class Reference

An LLVMContext together with an associated mutex that can be used to lock the context to prevent concurrent access by other threads. More...

#include "llvm/ExecutionEngine/Orc/ThreadSafeModule.h"

Classes

class  Lock
 

Public Member Functions

 ThreadSafeContext ()=default
 Construct a null context. More...
 
 ThreadSafeContext (std::unique_ptr< LLVMContext > NewCtx)
 Construct a ThreadSafeContext from the given LLVMContext. More...
 
LLVMContextgetContext ()
 Returns a pointer to the LLVMContext that was used to construct this instance, or null if the instance was default constructed. More...
 
const LLVMContextgetContext () const
 Returns a pointer to the LLVMContext that was used to construct this instance, or null if the instance was default constructed. More...
 
Lock getLock ()
 

Detailed Description

An LLVMContext together with an associated mutex that can be used to lock the context to prevent concurrent access by other threads.

Definition at line 29 of file ThreadSafeModule.h.

Constructor & Destructor Documentation

◆ ThreadSafeContext() [1/2]

llvm::orc::ThreadSafeContext::ThreadSafeContext ( )
default

Construct a null context.

Referenced by llvm::orc::ThreadSafeContext::Lock::Lock().

◆ ThreadSafeContext() [2/2]

llvm::orc::ThreadSafeContext::ThreadSafeContext ( std::unique_ptr< LLVMContext NewCtx)
inline

Construct a ThreadSafeContext from the given LLVMContext.

Definition at line 58 of file ThreadSafeModule.h.

References assert().

Member Function Documentation

◆ getContext() [1/2]

LLVMContext* llvm::orc::ThreadSafeContext::getContext ( )
inline

Returns a pointer to the LLVMContext that was used to construct this instance, or null if the instance was default constructed.

Definition at line 66 of file ThreadSafeModule.h.

Referenced by llvm::orc::cloneToNewContext().

◆ getContext() [2/2]

const LLVMContext* llvm::orc::ThreadSafeContext::getContext ( ) const
inline

Returns a pointer to the LLVMContext that was used to construct this instance, or null if the instance was default constructed.

Definition at line 70 of file ThreadSafeModule.h.

◆ getLock()

Lock llvm::orc::ThreadSafeContext::getLock ( )
inline

Definition at line 72 of file ThreadSafeModule.h.

References assert(), and llvm::Lock.


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