ir done'ish
This commit is contained in:
@@ -313,14 +313,18 @@ pub const Builder = struct {
|
||||
return self.emit(.{ .struct_gep = .{ .base = base, .field_index = field_index } }, ty);
|
||||
}
|
||||
|
||||
pub fn structGepTyped(self: *Builder, base: Ref, field_index: u32, ty: TypeId, base_type: TypeId) Ref {
|
||||
return self.emit(.{ .struct_gep = .{ .base = base, .field_index = field_index, .base_type = base_type } }, ty);
|
||||
}
|
||||
|
||||
// ── Enum ops ────────────────────────────────────────────────────
|
||||
|
||||
pub fn enumInit(self: *Builder, tag: u32, payload: Ref, ty: TypeId) Ref {
|
||||
return self.emit(.{ .enum_init = .{ .tag = tag, .payload = payload } }, ty);
|
||||
}
|
||||
|
||||
pub fn enumTag(self: *Builder, val: Ref) Ref {
|
||||
return self.emit(.{ .enum_tag = .{ .operand = val } }, .s32);
|
||||
pub fn enumTag(self: *Builder, val: Ref, tag_ty: TypeId) Ref {
|
||||
return self.emit(.{ .enum_tag = .{ .operand = val } }, tag_ty);
|
||||
}
|
||||
|
||||
// ── Optional ops ────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user