enumstd.zig.llvm.Builder.WipFunction.Block.Index[src]

Fields

entry
_

Functions

Functionptr[src]

pub fn ptr(self: Index, wip: *WipFunction) *Block

Parameters

self: Index

Source Code

Source code
pub fn ptr(self: Index, wip: *WipFunction) *Block {
    return &wip.blocks.items[@intFromEnum(self)];
}

FunctionptrConst[src]

pub fn ptrConst(self: Index, wip: *const WipFunction) *const Block

Parameters

self: Index
wip: *const WipFunction

Source Code

Source code
pub fn ptrConst(self: Index, wip: *const WipFunction) *const Block {
    return &wip.blocks.items[@intFromEnum(self)];
}

FunctiontoInst[src]

pub fn toInst(self: Index, function: *const Function) Instruction.Index

Parameters

self: Index
function: *const Function

Source Code

Source code
pub fn toInst(self: Index, function: *const Function) Instruction.Index {
    return function.blocks[@intFromEnum(self)].instruction;
}

Source Code

Source code
const Index = enum(u32) {
    entry,
    _,

    pub fn ptr(self: Index, wip: *WipFunction) *Block {
        return &wip.blocks.items[@intFromEnum(self)];
    }

    pub fn ptrConst(self: Index, wip: *const WipFunction) *const Block {
        return &wip.blocks.items[@intFromEnum(self)];
    }

    pub fn toInst(self: Index, function: *const Function) Instruction.Index {
        return function.blocks[@intFromEnum(self)].instruction;
    }
}