From 237233b04bdbbb82a5ce881a074fdd4ca55fe58f Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 20 Jun 2019 18:15:27 -0400 Subject: fix coroutines --- src/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index 5cb65b38f3..79c92964f6 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -3755,7 +3755,7 @@ static LLVMValueRef ir_render_call(CodeGen *g, IrExecutable *executable, IrInstr bool prefix_arg_err_ret_stack = get_prefix_arg_err_ret_stack(g, fn_type_id); bool is_var_args = fn_type_id->is_var_args; ZigList gen_param_values = {}; - LLVMValueRef result_loc = first_arg_ret ? ir_llvm_value(g, instruction->result_loc) : nullptr; + LLVMValueRef result_loc = (first_arg_ret || instruction->is_async) ? ir_llvm_value(g, instruction->result_loc) : nullptr; if (first_arg_ret) { gen_param_values.append(result_loc); } -- cgit v1.2.3