mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 03:42:17 +00:00
DecRef union clear tag id
This commit is contained in:
parent
612877036a
commit
21d4b61fca
1 changed files with 9 additions and 1 deletions
|
@ -2859,7 +2859,15 @@ pub fn build_exp_stmt<'a, 'ctx>(
|
|||
|
||||
_ if lay.is_refcounted() => {
|
||||
if value.is_pointer_value() {
|
||||
let value_ptr = value.into_pointer_value();
|
||||
let value_ptr = match lay.repr {
|
||||
LayoutRepr::Union(union_layout)
|
||||
if union_layout
|
||||
.stores_tag_id_in_pointer(env.target_info) =>
|
||||
{
|
||||
tag_pointer_clear_tag_id(env, value.into_pointer_value())
|
||||
}
|
||||
_ => value.into_pointer_value(),
|
||||
};
|
||||
|
||||
let then_block = env.context.append_basic_block(parent, "then");
|
||||
let done_block = env.context.append_basic_block(parent, "done");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue