aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-06-07 11:51:50 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-06-07 11:51:50 -0400
commit4c222a482fa3807fce8455aa54fe4931bee7bb37 (patch)
tree022f1cd00998054be3918dd62f4a43f0a3d733eb /src
parent76a3938d69e23a22ee2d5db971737c532ee8a6b0 (diff)
downloadzig-4c222a482fa3807fce8455aa54fe4931bee7bb37.tar.gz
zig-4c222a482fa3807fce8455aa54fe4931bee7bb37.zip
fix behavior for non sret fn calls
Diffstat (limited to 'src')
-rw-r--r--src/ir.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 8614593390..e02af70908 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -15311,7 +15311,7 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c
return ir_finish_anal(ira, result);
}
- call_instruction->result_loc->written = true;
+ call_instruction->result_loc->written = handle_is_ptr(impl_fn_type_id->return_type);
assert(async_allocator_inst == nullptr);
IrInstruction *new_call_instruction = ir_build_call_gen(ira, &call_instruction->base,
impl_fn, nullptr, impl_param_count, casted_args, fn_inline,
@@ -15418,7 +15418,7 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c
return result_loc;
}
- call_instruction->result_loc->written = true;
+ call_instruction->result_loc->written = handle_is_ptr(return_type);
IrInstruction *new_call_instruction = ir_build_call_gen(ira, &call_instruction->base, fn_entry, fn_ref,
call_param_count, casted_args, fn_inline, false, nullptr, casted_new_stack,
result_loc, return_type);