DoxigAlpha

buildAggregate

Function parameters

Parameters

#
self:*WipFunction
elems:[]const Value
name:[]const u8

Type definitions in this namespace

Types

#

Functions in this namespace

Functions

#

= 16

Values

#

Source

Implementation

#
pub fn buildAggregate(
    self: *WipFunction,
    ty: Type,
    elems: []const Value,
    name: []const u8,
) Allocator.Error!Value {
    assert(ty.aggregateLen(self.builder) == elems.len);
    var cur = try self.builder.poisonValue(ty);
    for (elems, 0..) |elem, index|
        cur = try self.insertValue(cur, elem, &[_]u32{@intCast(index)}, name);
    return cur;
}