mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
fix ffi
This commit is contained in:
parent
a05d8b52c0
commit
8d9f5b078e
2 changed files with 11 additions and 26 deletions
|
@ -2464,27 +2464,6 @@ pub fn extract_tag_discriminant<'a, 'ctx, 'env>(
|
|||
}
|
||||
}
|
||||
|
||||
fn extract_tag_discriminant_struct<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
from_value: StructValue<'ctx>,
|
||||
) -> IntValue<'ctx> {
|
||||
let struct_type = env
|
||||
.context
|
||||
.struct_type(&[env.context.i64_type().into()], false);
|
||||
|
||||
let struct_value = complex_bitcast_struct_struct(
|
||||
env.builder,
|
||||
from_value,
|
||||
struct_type,
|
||||
"extract_tag_discriminant_struct",
|
||||
);
|
||||
|
||||
env.builder
|
||||
.build_extract_value(struct_value, 0, "")
|
||||
.expect("desired field did not decode")
|
||||
.into_int_value()
|
||||
}
|
||||
|
||||
fn extract_tag_discriminant_ptr<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
from_value: PointerValue<'ctx>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue