mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
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:
parent
2e2e609547
commit
398bf2f96c
20 changed files with 1830 additions and 1432 deletions
|
@ -58,8 +58,8 @@ impl<'ctx> RocStruct<'ctx> {
|
|||
let passed_by_ref = layout_repr.is_passed_by_reference(layout_interner);
|
||||
|
||||
if passed_by_ref {
|
||||
let alloca = env.builder.build_alloca(struct_type, "struct_alloca");
|
||||
env.builder.build_store(alloca, struct_val);
|
||||
let alloca = env.builder.new_build_alloca(struct_type, "struct_alloca");
|
||||
env.builder.new_build_store(alloca, struct_val);
|
||||
RocStruct::ByReference(alloca)
|
||||
} else {
|
||||
RocStruct::ByValue(struct_val)
|
||||
|
@ -156,8 +156,7 @@ fn index_struct_ptr<'a, 'ctx>(
|
|||
let name = format!("struct_field_access_record_{index}");
|
||||
let field_value = env
|
||||
.builder
|
||||
.new_build_struct_gep(struct_type, ptr, index as u32, &name)
|
||||
.unwrap();
|
||||
.new_build_struct_gep(struct_type, ptr, index as u32, &name);
|
||||
|
||||
load_roc_value(
|
||||
env,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue