Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

debugGlobalVarAssumeCapacity

Builder.debugGlobalVarAssumeCapacity
fn debugGlobalVarAssumeCapacity(
    self: *Builder,
    name: ?Metadata.String,
    linkage_name: ?Metadata.String,
    file: ?Metadata,
    scope: ?Metadata,
    line: u32,
    ty: ?Metadata,
    variable: Variable.Index,
    options: Metadata.GlobalVar.Options,
) Metadata

File

lib/std/zig/llvm/Builder.zig:13299

Code

fn debugGlobalVarAssumeCapacity(
    self: *Builder,
    name: ?Metadata.String,
    linkage_name: ?Metadata.String,
    file: ?Metadata,
    scope: ?Metadata,
    line: u32,
    ty: ?Metadata,
    variable: Variable.Index,
    options: Metadata.GlobalVar.Options,
) Metadata {
    assert(!self.strip);
    return self.metadataDistinctAssumeCapacity(
        if (options.local) .@"global_var local" else .global_var,
        Metadata.GlobalVar{
            .name = .wrap(name),
            .linkage_name = .wrap(linkage_name),
            .file = .wrap(file),
            .scope = .wrap(scope),
            .line = line,
            .ty = .wrap(ty),
            .variable = variable,
        },
    );
}