sun::codegen::CodegenState::ReturnGuard

sun::codegen::CodegenState::ReturnGuard

struct · Source (opens in a new tab)

struct sun::codegen::CodegenState::ReturnGuard

Restores what the enclosing function's returns were allowed to do, so a nested function or method body cannot leak its own contract outwards.

Public Functions

ReturnGuard

ReturnGuard(CodegenState &s)

public · function · Source (opens in a new tab)

sun::codegen::CodegenState::ReturnGuard::ReturnGuard(CodegenState &s)

Saves the active function return state for restoration when the guard leaves scope.

Related: CodegenState

ReturnGuard(const ReturnGuard &)=delete

public · function · Source (opens in a new tab)

sun::codegen::CodegenState::ReturnGuard::ReturnGuard(const ReturnGuard &)=delete

Saves the active function return state for restoration when the guard leaves scope.

operator=

public · function · Source (opens in a new tab)

ReturnGuard & sun::codegen::CodegenState::ReturnGuard::operator=(const ReturnGuard &)=delete

Disallows assignment so ownership and object identity cannot be duplicated.

Related: ReturnGuard

~ReturnGuard

public · function · Source (opens in a new tab)

sun::codegen::CodegenState::ReturnGuard::~ReturnGuard()

Restores the previous function return state when the guard leaves scope.

Public Fields

savedCanError

public · variable · Source (opens in a new tab)

bool sun::codegen::CodegenState::ReturnGuard::savedCanError

No documentation comment.

savedReturnsRef

public · variable · Source (opens in a new tab)

bool sun::codegen::CodegenState::ReturnGuard::savedReturnsRef

No documentation comment.

savedValueType

public · variable · Source (opens in a new tab)

llvm::Type* sun::codegen::CodegenState::ReturnGuard::savedValueType

No documentation comment.

state

public · variable · Source (opens in a new tab)

CodegenState& sun::codegen::CodegenState::ReturnGuard::state

No documentation comment.

Related: CodegenState