update rust code to llvm-16 and fix build

also update:
 - llvm frame address
 - erased function type
 - dec passing to zig
 - gen dev storage size
This commit is contained in:
Brendan Hansknecht 2023-09-21 13:12:48 -07:00
parent 2e2e609547
commit 398bf2f96c
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
20 changed files with 1830 additions and 1432 deletions

View file

@ -5,7 +5,7 @@ use inkwell::{
};
use roc_mono::ir::ErasedField;
use super::build::Env;
use super::build::{BuilderExt, Env};
pub fn opaque_ptr_type<'ctx>(env: &Env<'_, 'ctx, '_>) -> PointerType<'ctx> {
env.context.i8_type().ptr_type(AddressSpace::default())
@ -50,7 +50,7 @@ fn bitcast_to_opaque_ptr<'ctx>(
value: PointerValue<'ctx>,
) -> PointerValue<'ctx> {
env.builder
.build_bitcast(
.new_build_bitcast(
value,
env.context.i8_type().ptr_type(AddressSpace::default()),
"to_opaque_ptr",
@ -108,7 +108,7 @@ pub fn load<'ctx>(
let value = env
.builder
.build_bitcast(value, as_type, "bitcast_to_type")
.new_build_bitcast(value, as_type, "bitcast_to_type")
.into_pointer_value();
value