mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
clippy
This commit is contained in:
parent
f2f9897187
commit
718aa34b19
4 changed files with 4 additions and 196 deletions
|
@ -4,24 +4,6 @@ use inkwell::types::{BasicType, BasicTypeEnum, IntType, StructType};
|
|||
use inkwell::AddressSpace;
|
||||
use roc_mono::layout::{Builtin, Layout, UnionLayout};
|
||||
|
||||
pub fn basic_type_from_function_layout<'a, 'ctx, 'env>(
|
||||
env: &crate::llvm::build::Env<'a, 'ctx, 'env>,
|
||||
args: &[Layout<'_>],
|
||||
ret_layout: &Layout<'_>,
|
||||
) -> BasicTypeEnum<'ctx> {
|
||||
let ret_type = basic_type_from_layout(env, &ret_layout);
|
||||
let mut arg_basic_types = Vec::with_capacity_in(args.len(), env.arena);
|
||||
|
||||
for arg_layout in args.iter() {
|
||||
arg_basic_types.push(basic_type_from_layout(env, arg_layout));
|
||||
}
|
||||
|
||||
let fn_type = ret_type.fn_type(arg_basic_types.into_bump_slice(), false);
|
||||
let ptr_type = fn_type.ptr_type(AddressSpace::Generic);
|
||||
|
||||
ptr_type.as_basic_type_enum()
|
||||
}
|
||||
|
||||
fn basic_type_from_record<'a, 'ctx, 'env>(
|
||||
env: &crate::llvm::build::Env<'a, 'ctx, 'env>,
|
||||
fields: &[Layout<'_>],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue