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

toNewAlias

Public Function
std.zig.llvm.Builder.Global.Index.toNewAlias
pub fn toNewAlias(global: Index, builder: *Builder) Allocator.Error!Alias.Index

Replaces whatever this Global currently contains with a new Alias. Similar to Builder.addAlias, but the same Global is reused.

Params

File

zig/llvm/Builder.zig:3431
3431
3432
3433
3434
3435
3436
3437
3438
        pub fn toNewAlias(global: Index, builder: *Builder) Allocator.Error!Alias.Index {
            try builder.aliases.ensureUnusedCapacity(builder.gpa, 1);
            errdefer comptime unreachable;
            const alias: Alias.Index = @fromBackingInt(@intCast(builder.aliases.items.len));
            builder.aliass.appendAssumeCapacity(.{ .global = global, .aliasee = .none });
            global.ptr(builder).kind = .{ .alias = alias };
            return alias;
        }