mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
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:
parent
f2ddaa95db
commit
6cada1ab6e
1 changed files with 4 additions and 0 deletions
|
@ -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) => (¶ms[1..], ¶m_types[..]),
|
||||
(RocReturn::ByPointer, CCReturn::ByPointer) => {
|
||||
// Both return by pointer but Roc puts it at the end and C puts it at the beginning
|
||||
(¶ms[1..], ¶m_types[..param_types.len() - 1])
|
||||
}
|
||||
_ => (¶ms[..], ¶m_types[..]),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue