Have basic_type_from_layout take LayoutRepr

This commit is contained in:
Ayaz Hafiz 2023-06-16 21:17:31 -05:00
parent 555cbcc87b
commit 8495f3b085
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
10 changed files with 403 additions and 137 deletions

View file

@ -1,7 +1,7 @@
use inkwell::{types::BasicType, values::PointerValue};
use roc_mono::layout::{LayoutRepr, STLayoutInterner};
use super::{align::LlvmAlignment, build::Env, convert::basic_type_from_layout_repr};
use super::{align::LlvmAlignment, build::Env, convert::basic_type_from_layout};
pub fn build_memcpy<'a, 'ctx>(
env: &Env<'a, 'ctx, '_>,
@ -11,7 +11,7 @@ pub fn build_memcpy<'a, 'ctx>(
source: PointerValue<'ctx>,
) {
let align_bytes = layout.llvm_alignment_bytes(layout_interner);
let width = basic_type_from_layout_repr(env, layout_interner, layout)
let width = basic_type_from_layout(env, layout_interner, layout)
.size_of()
.unwrap();
if align_bytes > 0 {