Function buildAggregate [src]

Prototype

pub fn buildAggregate( self: *WipFunction, ty: Type, elems: []const Value, name: []const u8, ) Allocator.Error!Value

Parameters

self: *WipFunctionty: Typeelems: []const Valuename: []const u8

Source

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; }