llvm backend: fix how closure value is passed

This commit is contained in:
Folkert 2023-05-05 16:36:29 +02:00
parent 83742bc741
commit 1c16617bec
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -5574,7 +5574,14 @@ pub(crate) fn roc_function_call<'a, 'ctx>(
let closure_data_ptr = env
.builder
.build_alloca(closure_data.get_type(), "closure_data_ptr");
env.builder.build_store(closure_data_ptr, closure_data);
store_roc_value(
env,
layout_interner,
lambda_set.runtime_representation(),
closure_data_ptr,
closure_data,
);
let stepper_caller = build_transform_caller(
env,