Try (unsuccessfully) to fix an LLVM code gen bug

We still get a panic as follows:

cargo run run --debug examples/static-site-gen/app.roc -- examples/static-site-gen/input examples/static-site-gen/output

 Stored value type does not match pointer operand type!
  store { [0 x i64], [24 x i8], i8, [7 x i8] }* %result_value, { [0 x i64], [24 x i8], i8, [7 x i8] }* %0, align 8
 { [0 x i64], [24 x i8], i8, [7 x i8] }*
This commit is contained in:
Brian Carroll 2022-08-28 23:57:31 +01:00
parent f2ddaa95db
commit 6cada1ab6e
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0

View file

@ -3726,6 +3726,10 @@ fn expose_function_to_host_help_c_abi_v2<'a, 'ctx, 'env>(
// Drop the return pointer the other way, if the C function returns by pointer but Roc
// doesn't
(RocReturn::Return, CCReturn::ByPointer) => (&params[1..], &param_types[..]),
(RocReturn::ByPointer, CCReturn::ByPointer) => {
// Both return by pointer but Roc puts it at the end and C puts it at the beginning
(&params[1..], &param_types[..param_types.len() - 1])
}
_ => (&params[..], &param_types[..]),
};