Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
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"

Public Member Functions

 ThreadSafeContext ()=default
 Construct a null context.
 ThreadSafeContext (std::unique_ptr< LLVMContext > NewCtx)
 Construct a ThreadSafeContext from the given LLVMContext.
template<typename Func>
decltype(auto) withContextDo (Func &&F)
template<typename Func>
decltype(auto) withContextDo (Func &&F) const

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.

◆ ThreadSafeContext() [2/2]

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

Construct a ThreadSafeContext from the given LLVMContext.

Definition at line 43 of file ThreadSafeModule.h.

References assert(), and llvm::move().

Member Function Documentation

◆ withContextDo() [1/2]

template<typename Func>
decltype(auto) llvm::orc::ThreadSafeContext::withContextDo ( Func && F)
inline

Definition at line 49 of file ThreadSafeModule.h.

References F.

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

◆ withContextDo() [2/2]

template<typename Func>
decltype(auto) llvm::orc::ThreadSafeContext::withContextDo ( Func && F) const
inline

Definition at line 57 of file ThreadSafeModule.h.

References F.


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