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

renameAssumeCapacity

Private Function
std.zig.llvm.Builder.Global.Index.renameAssumeCapacity
fn renameAssumeCapacity(self: Index, new_name: StrtabString, builder: *Builder) void

Params

File

zig/llvm/Builder.zig:3460
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
        fn renameAssumeCapacity(self: Index, new_name: StrtabString, builder: *Builder) void {
            const old_name = self.name(builder);
            if (new_name == old_name) return;
            const index = @backingInt(self.unwrap(builder));
            builder.globals.setKey(index, new_name);
            if (!old_name.isAnon()) return;
            builder.next_unnamed_global = @fromBackingInt(@backingInt(builder.next_unnamed_global) - 1);
            if (builder.next_unnamed_global == old_name) return;
            builder.getGlobal(builder.next_unnamed_global).?.renameAssumeCapacity(old_name, builder);
        }