Unwrap lambda sets in cc type choosing

This commit is contained in:
Ayaz Hafiz 2022-08-14 17:59:44 -05:00
parent 0606086eb6
commit cefbf3aa51
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -6411,11 +6411,11 @@ fn to_cc_type<'a, 'ctx, 'env>(
env: &Env<'a, 'ctx, 'env>,
layout: &Layout<'a>,
) -> BasicTypeEnum<'ctx> {
match layout {
Layout::Builtin(builtin) => to_cc_type_builtin(env, builtin),
_ => {
match layout.runtime_representation() {
Layout::Builtin(builtin) => to_cc_type_builtin(env, &builtin),
layout => {
// TODO this is almost certainly incorrect for bigger structs
basic_type_from_layout(env, layout)
basic_type_from_layout(env, &layout)
}
}
}