enumstd.zig.llvm.Builder.Function.Index[src]

Fields

none = std.math.maxInt(u32)
_

Functions

Functionptr[src]

pub fn ptr(self: Index, builder: *Builder) *Function

Parameters

self: Index
builder: *Builder

Source Code

Source code
pub fn ptr(self: Index, builder: *Builder) *Function {
    return &builder.functions.items[@intFromEnum(self)];
}

FunctionptrConst[src]

pub fn ptrConst(self: Index, builder: *const Builder) *const Function

Parameters

self: Index
builder: *const Builder

Source Code

Source code
pub fn ptrConst(self: Index, builder: *const Builder) *const Function {
    return &builder.functions.items[@intFromEnum(self)];
}

Functionname[src]

pub fn name(self: Index, builder: *const Builder) StrtabString

Parameters

self: Index
builder: *const Builder

Source Code

Source code
pub fn name(self: Index, builder: *const Builder) StrtabString {
    return self.ptrConst(builder).global.name(builder);
}

Functionrename[src]

pub fn rename(self: Index, new_name: StrtabString, builder: *Builder) Allocator.Error!void

Parameters

self: Index
new_name: StrtabString
builder: *Builder

Source Code

Source code
pub fn rename(self: Index, new_name: StrtabString, builder: *Builder) Allocator.Error!void {
    return self.ptrConst(builder).global.rename(new_name, builder);
}

FunctiontypeOf[src]

pub fn typeOf(self: Index, builder: *const Builder) Type

Parameters

self: Index
builder: *const Builder

Source Code

Source code
pub fn typeOf(self: Index, builder: *const Builder) Type {
    return self.ptrConst(builder).global.typeOf(builder);
}

FunctiontoConst[src]

pub fn toConst(self: Index, builder: *const Builder) Constant

Parameters

self: Index
builder: *const Builder

Source Code

Source code
pub fn toConst(self: Index, builder: *const Builder) Constant {
    return self.ptrConst(builder).global.toConst();
}

FunctiontoValue[src]

pub fn toValue(self: Index, builder: *const Builder) Value

Parameters

self: Index
builder: *const Builder

Source Code

Source code
pub fn toValue(self: Index, builder: *const Builder) Value {
    return self.toConst(builder).toValue();
}

FunctionsetLinkage[src]

pub fn setLinkage(self: Index, linkage: Linkage, builder: *Builder) void

Parameters

self: Index
linkage: Linkage
builder: *Builder

Source Code

Source code
pub fn setLinkage(self: Index, linkage: Linkage, builder: *Builder) void {
    return self.ptrConst(builder).global.setLinkage(linkage, builder);
}

FunctionsetUnnamedAddr[src]

pub fn setUnnamedAddr(self: Index, unnamed_addr: UnnamedAddr, builder: *Builder) void

Parameters

self: Index
unnamed_addr: UnnamedAddr
builder: *Builder

Source Code

Source code
pub fn setUnnamedAddr(self: Index, unnamed_addr: UnnamedAddr, builder: *Builder) void {
    return self.ptrConst(builder).global.setUnnamedAddr(unnamed_addr, builder);
}

FunctionsetCallConv[src]

pub fn setCallConv(self: Index, call_conv: CallConv, builder: *Builder) void

Parameters

self: Index
call_conv: CallConv
builder: *Builder

Source Code

Source code
pub fn setCallConv(self: Index, call_conv: CallConv, builder: *Builder) void {
    self.ptr(builder).call_conv = call_conv;
}

FunctionsetAttributes[src]

pub fn setAttributes( self: Index, new_function_attributes: FunctionAttributes, builder: *Builder, ) void

Parameters

self: Index
new_function_attributes: FunctionAttributes
builder: *Builder

Source Code

Source code
pub fn setAttributes(
    self: Index,
    new_function_attributes: FunctionAttributes,
    builder: *Builder,
) void {
    self.ptr(builder).attributes = new_function_attributes;
}

FunctionsetSection[src]

pub fn setSection(self: Index, section: String, builder: *Builder) void

Parameters

self: Index
section: String
builder: *Builder

Source Code

Source code
pub fn setSection(self: Index, section: String, builder: *Builder) void {
    self.ptr(builder).section = section;
}

FunctionsetAlignment[src]

pub fn setAlignment(self: Index, alignment: Alignment, builder: *Builder) void

Parameters

self: Index
alignment: Alignment
builder: *Builder

Source Code

Source code
pub fn setAlignment(self: Index, alignment: Alignment, builder: *Builder) void {
    self.ptr(builder).alignment = alignment;
}

FunctionsetSubprogram[src]

pub fn setSubprogram(self: Index, subprogram: Metadata, builder: *Builder) void

Parameters

self: Index
subprogram: Metadata
builder: *Builder

Source Code

Source code
pub fn setSubprogram(self: Index, subprogram: Metadata, builder: *Builder) void {
    self.ptrConst(builder).global.setDebugMetadata(subprogram, builder);
}

Source Code

Source code
pub const Index = enum(u32) {
    none = std.math.maxInt(u32),
    _,

    pub fn ptr(self: Index, builder: *Builder) *Function {
        return &builder.functions.items[@intFromEnum(self)];
    }

    pub fn ptrConst(self: Index, builder: *const Builder) *const Function {
        return &builder.functions.items[@intFromEnum(self)];
    }

    pub fn name(self: Index, builder: *const Builder) StrtabString {
        return self.ptrConst(builder).global.name(builder);
    }

    pub fn rename(self: Index, new_name: StrtabString, builder: *Builder) Allocator.Error!void {
        return self.ptrConst(builder).global.rename(new_name, builder);
    }

    pub fn typeOf(self: Index, builder: *const Builder) Type {
        return self.ptrConst(builder).global.typeOf(builder);
    }

    pub fn toConst(self: Index, builder: *const Builder) Constant {
        return self.ptrConst(builder).global.toConst();
    }

    pub fn toValue(self: Index, builder: *const Builder) Value {
        return self.toConst(builder).toValue();
    }

    pub fn setLinkage(self: Index, linkage: Linkage, builder: *Builder) void {
        return self.ptrConst(builder).global.setLinkage(linkage, builder);
    }

    pub fn setUnnamedAddr(self: Index, unnamed_addr: UnnamedAddr, builder: *Builder) void {
        return self.ptrConst(builder).global.setUnnamedAddr(unnamed_addr, builder);
    }

    pub fn setCallConv(self: Index, call_conv: CallConv, builder: *Builder) void {
        self.ptr(builder).call_conv = call_conv;
    }

    pub fn setAttributes(
        self: Index,
        new_function_attributes: FunctionAttributes,
        builder: *Builder,
    ) void {
        self.ptr(builder).attributes = new_function_attributes;
    }

    pub fn setSection(self: Index, section: String, builder: *Builder) void {
        self.ptr(builder).section = section;
    }

    pub fn setAlignment(self: Index, alignment: Alignment, builder: *Builder) void {
        self.ptr(builder).alignment = alignment;
    }

    pub fn setSubprogram(self: Index, subprogram: Metadata, builder: *Builder) void {
        self.ptrConst(builder).global.setDebugMetadata(subprogram, builder);
    }
}