Function block_address

Source
pub fn block_address(
    function: &ValueRef,
    basic_block: &BasicBlockRef,
) -> ValueRef
Expand description

Obtain the address of a basic block in a function.

§Details

Retrieves the address of a basic block within a specified function.

This function wraps the LLVMBlockAddress function from the LLVM core library. It generates a constant representing the address of a specific basic block within a given function. This is typically used for low-level operations such as creating labels or handling jumps within a function at compile time.

§Parameters

  • function: A reference to the function (ValueRef) that contains the basic block whose address is being retrieved.
  • basic_block: A reference to the basic block (BasicBlockRef) within the function whose address is to be retrieved.

§Returns

Returns an instance of ValueRef, which encapsulates the address of the specified basic block as a constant value determined at compile time.