authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-11-29 21:36:12-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-11-29 21:36:12-05:00
log7278c51ddd1f3d0a06a4181f3588032d6940a8d4
treeb9180cb29cf2b2ecd7ae27478b495fb626ee1677
parent559bd27b08f6504addd668a1df01b484dd130430
signaturelock-open Commit is signed but in an unrecognized format.

fix empty result location for parameters not working


1 files changed, 6 insertions(+), 2 deletions(-)

src/ir.cpp+6-2
...@@ -5971,7 +5971,9 @@ static IrInstruction *ir_gen_fn_call(IrBuilder *irb, Scope *scope, AstNode *node...@@ -5971,7 +5971,9 @@ static IrInstruction *ir_gen_fn_call(IrBuilder *irb, Scope *scope, AstNode *node
59715971
5972 IrInstruction *arg_index = ir_build_const_usize(irb, scope, arg_node, i);5972 IrInstruction *arg_index = ir_build_const_usize(irb, scope, arg_node, i);
5973 IrInstruction *arg_type = ir_build_arg_type(irb, scope, node, fn_type, arg_index, true);5973 IrInstruction *arg_type = ir_build_arg_type(irb, scope, node, fn_type, arg_index, true);
5974 ResultLocCast *result_loc_cast = ir_build_cast_result_loc(irb, arg_type, no_result_loc());5974 ResultLoc *no_result = no_result_loc();
5975 ir_build_reset_result(irb, scope, node, no_result);
5976 ResultLocCast *result_loc_cast = ir_build_cast_result_loc(irb, arg_type, no_result);
59755977
5976 IrInstruction *arg = ir_gen_node_extra(irb, arg_node, scope, LValNone, &result_loc_cast->base);5978 IrInstruction *arg = ir_gen_node_extra(irb, arg_node, scope, LValNone, &result_loc_cast->base);
5977 if (arg == irb->codegen->invalid_instruction)5979 if (arg == irb->codegen->invalid_instruction)
...@@ -16278,8 +16280,10 @@ static IrInstruction *ir_resolve_result_raw(IrAnalyze *ira, IrInstruction *suspe...@@ -16278,8 +16280,10 @@ static IrInstruction *ir_resolve_result_raw(IrAnalyze *ira, IrInstruction *suspe
16278 force_runtime, non_null_comptime);16280 force_runtime, non_null_comptime);
16279 }16281 }
1628016282
16281 return ir_analyze_ptr_cast(ira, suspend_source_instr, parent_result_loc,16283 result_loc->written = true;
16284 result_loc->resolved_loc = ir_analyze_ptr_cast(ira, suspend_source_instr, parent_result_loc,
16282 ptr_type, result_cast->base.source_instruction, false);16285 ptr_type, result_cast->base.source_instruction, false);
16286 return result_loc->resolved_loc;
16283 }16287 }
16284 case ResultLocIdBitCast: {16288 case ResultLocIdBitCast: {
16285 ResultLocBitCast *result_bit_cast = reinterpret_cast<ResultLocBitCast *>(result_loc);16289 ResultLocBitCast *result_bit_cast = reinterpret_cast<ResultLocBitCast *>(result_loc);