Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Public Function

block

Public Function
std.zig.llvm.Builder.WipFunction.block
pub fn block(self: *WipFunction, incoming: u32, name: []const u8) Allocator.Error!Block.Index

Params

File

zig/llvm/Builder.zig:6428
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
    pub fn block(self: *WipFunction, incoming: u32, name: []const u8) Allocator.Error!Block.Index {
        try self.blocks.ensureUnusedCapacity(self.builder.gpa, 1);

        const index: Block.Index = @fromBackingInt(@intCast(self.blocks.items.len));
        const final_name = if (self.strip) .empty else try self.builder.string(name);
        self.blocks.appendAssumeCapacity(.{
            .name = final_name,
            .incoming = incoming,
            .instructions = .empty,
        });
        return index;
    }