mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
make it work
This commit is contained in:
parent
c827256e47
commit
38da99b1ac
4 changed files with 32 additions and 23 deletions
|
@ -154,18 +154,11 @@ fn build_has_tag_id_help<'a, 'ctx, 'env>(
|
|||
);
|
||||
|
||||
let tag_data_ptr = {
|
||||
let data_index = env
|
||||
.context
|
||||
.i64_type()
|
||||
.const_int(TAG_DATA_INDEX as u64, false);
|
||||
let ptr = env
|
||||
.builder
|
||||
.build_struct_gep(tag_value, TAG_DATA_INDEX, "get_data_ptr")
|
||||
.unwrap();
|
||||
|
||||
let ptr = unsafe {
|
||||
env.builder.build_gep(
|
||||
tag_value_ptr.into_pointer_value(),
|
||||
&[data_index],
|
||||
"get_data_ptr",
|
||||
)
|
||||
};
|
||||
env.builder.build_bitcast(ptr, i8_ptr_type, "to_opaque")
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue