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. Private Function

addNamedMetadataAssumeCapacity

Private Function
std.zig.llvm.Builder.addNamedMetadataAssumeCapacity
fn addNamedMetadataAssumeCapacity(self: *Builder, name: String, operands: []const Metadata) void

Params

File

zig/llvm/Builder.zig:13821
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
fn addNamedMetadataAssumeCapacity(self: *Builder, name: String, operands: []const Metadata) void {
    assert(name != .none);
    const extra_index: u32 = @intCast(self.metadata_extra.items.len);
    self.metadata_extra.appendSliceAssumeCapacity(@ptrCast(operands));

    const gop = self.metadata_named.getOrPutAssumeCapacity(name);
    gop.value_ptr.* = .{
        .index = extra_index,
        .len = @intCast(operands.len),
    };
}