class ThreadSafeModule

Declaration

class ThreadSafeModule { /* full declaration omitted */ };

Description

An LLVM Module together with a shared ThreadSafeContext.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:77

Member Variables

private std::unique_ptr<Module> M
private llvm::orc::ThreadSafeContext TSCtx

Method Overview

Methods

ThreadSafeModule()

Description

Default construct a ThreadSafeModule. This results in a null module and null context.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:81

ThreadSafeModule(
    llvm::orc::ThreadSafeModule&& Other)

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:83

Parameters

llvm::orc::ThreadSafeModule&& Other

ThreadSafeModule(std::unique_ptr<Module> M,
                 std::unique_ptr<LLVMContext> Ctx)

Description

Construct a ThreadSafeModule from a unique_ptr <Module > and a unique_ptr <LLVMContext >. This creates a new ThreadSafeContext from the given context.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:104

Parameters

std::unique_ptr<Module> M
std::unique_ptr<LLVMContext> Ctx

ThreadSafeModule(
    std::unique_ptr<Module> M,
    llvm::orc::ThreadSafeContext TSCtx)

Description

Construct a ThreadSafeModule from a unique_ptr <Module > and an existing ThreadSafeContext.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:109

Parameters

std::unique_ptr<Module> M
llvm::orc::ThreadSafeContext TSCtx

llvm::orc::ThreadSafeContext getContext() const

Description

Returns the context for this ThreadSafeModule.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:153

llvm::Module* getModuleUnlocked()

Description

Get a raw pointer to the contained module without locking the context.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:147

const llvm::Module* getModuleUnlocked() const

Description

Get a raw pointer to the contained module without locking the context.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:150

bool operator bool() const

Description

Boolean conversion: This ThreadSafeModule will evaluate to true if it wraps a non-null module.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:122

template <typename Func>
decltype(auto) withModuleDo(Func&& F)

Description

Locks the associated ThreadSafeContext and calls the given function on the contained Module.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:133

Templates

Func

Parameters

Func&& F

template <typename Func>
decltype(auto) withModuleDo(Func&& F) const

Description

Locks the associated ThreadSafeContext and calls the given function on the contained Module.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:141

Templates

Func

Parameters

Func&& F

~ThreadSafeModule()

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:112