fix returning scalar values
```zig
export fn entry1() i32 {
return bar();
}
```
```llvm
define i32 @entry1() #2 !dbg !35 {
Entry:
%0 = call fastcc i32 @bar(), !dbg !39
ret i32 %0, !dbg !41
}
```
This commit is contained in:
@@ -3564,7 +3564,8 @@ static LLVMValueRef ir_render_var_ptr(CodeGen *g, IrExecutable *executable, IrIn
|
||||
static LLVMValueRef ir_render_return_ptr(CodeGen *g, IrExecutable *executable,
|
||||
IrInstructionReturnPtr *instruction)
|
||||
{
|
||||
assert(g->cur_ret_ptr != nullptr || !type_has_bits(instruction->base.value.type));
|
||||
src_assert(g->cur_ret_ptr != nullptr || !type_has_bits(instruction->base.value.type),
|
||||
instruction->base.source_node);
|
||||
return g->cur_ret_ptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user