mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
add instructions to the right block
This commit is contained in:
parent
88bac5eba7
commit
f3abb3b466
1 changed files with 7 additions and 4 deletions
|
@ -1295,6 +1295,9 @@ fn build_rec_union_recursive_decrement<'a, 'ctx>(
|
|||
_ => tag_id,
|
||||
};
|
||||
|
||||
let block = env.context.append_basic_block(parent, "tag_id_decrement");
|
||||
env.builder.position_at_end(block);
|
||||
|
||||
// if none of the fields are or contain anything refcounted, just move on
|
||||
if fields_need_no_refcounting(layout_interner, field_layouts) {
|
||||
// Still make sure to decrement the refcount of the union as a whole.
|
||||
|
@ -1302,13 +1305,13 @@ fn build_rec_union_recursive_decrement<'a, 'ctx>(
|
|||
let union_layout = LayoutRepr::Union(union_layout);
|
||||
refcount_ptr.modify(call_mode, union_layout, env, layout_interner);
|
||||
}
|
||||
|
||||
// this function returns void
|
||||
builder.new_build_return(None);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
let block = env.context.append_basic_block(parent, "tag_id_decrement");
|
||||
|
||||
env.builder.position_at_end(block);
|
||||
|
||||
let fields_struct = LayoutRepr::struct_(field_layouts);
|
||||
let wrapper_type = basic_type_from_layout(env, layout_interner, fields_struct);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue