mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
convert to pointer_cast where we can
This commit is contained in:
parent
8e36456765
commit
3720c38e2b
9 changed files with 213 additions and 1064 deletions
|
@ -380,14 +380,18 @@ fn build_clone<'a, 'ctx, 'env>(
|
|||
let bt = basic_type_from_layout(env, &layout);
|
||||
|
||||
// cast the i64 pointer to a pointer to block of memory
|
||||
let field1_cast = env.builder.build_bitcast(value, bt, "i64_to_opaque");
|
||||
let field1_cast = env.builder.build_pointer_cast(
|
||||
value.into_pointer_value(),
|
||||
bt.into_pointer_type(),
|
||||
"i64_to_opaque",
|
||||
);
|
||||
|
||||
build_clone_tag(
|
||||
env,
|
||||
layout_ids,
|
||||
ptr,
|
||||
cursors,
|
||||
field1_cast,
|
||||
field1_cast.into(),
|
||||
union_layout,
|
||||
WhenRecursive::Loop(union_layout),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue