Skip to content

Commit

Permalink
Improve readibility
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed Feb 19, 2025
1 parent eb4dfc3 commit a47431c
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,26 +399,22 @@ fn compile_func(
0,
);

values.push((
&param.id,
(
&param.ty,
if type_info.is_builtin() && type_info.is_zst(registry)? {
pre_entry_block
.append_operation(llvm::undef(
type_info.build(context, module, registry, metadata, &param.ty)?,
location,
))
.result(0)?
.into()
} else {
let value = entry_block.argument(count)?.into();
count += 1;
let value = if type_info.is_builtin() && type_info.is_zst(registry)? {
pre_entry_block
.append_operation(llvm::undef(
type_info.build(context, module, registry, metadata, &param.ty)?,
location,
))
.result(0)?
.into()
} else {
let value = entry_block.argument(count)?.into();
count += 1;

value
},
),
));
value
};

values.push((&param.id, (&param.ty, value)));
}

values.into_iter()
Expand Down

0 comments on commit a47431c

Please sign in to comment.