| ... | @@ -4149,17 +4149,7 @@ static LLVMValueRef ir_render_frame_address(CodeGen *g, IrExecutable *executable | ... | @@ -4149,17 +4149,7 @@ static LLVMValueRef ir_render_frame_address(CodeGen *g, IrExecutable *executable |
| 4149 | static LLVMValueRef ir_render_handle(CodeGen *g, IrExecutable *executable, | 4149 | static LLVMValueRef ir_render_handle(CodeGen *g, IrExecutable *executable, |
| 4150 | IrInstructionHandle *instruction) | 4150 | IrInstructionHandle *instruction) |
| 4151 | { | 4151 | { |
| 4152 | | 4152 | return LLVMConstNull(g->builtin_types.entry_promise->type_ref); |
| 4153 | bool is_async = executable->fn_entry != nullptr && | | |
| 4154 | executable->fn_entry->type_entry->data.fn.fn_type_id.cc == CallingConventionAsync; | | |
| 4155 | | | |
| 4156 | if (!is_async || !executable->coro_handle) { | | |
| 4157 | add_node_error(g, instruction->base.source_node, buf_sprintf("@handle() in non-async function")); | | |
| 4158 | return LLVMConstNull(g->builtin_types.entry_promise->type_ref); | | |
| 4159 | } | | |
| 4160 | | | |
| 4161 | LLVMValueRef handle = ir_llvm_value(g, executable->coro_handle); | | |
| 4162 | return LLVMBuildRet(g->builder, handle); | | |
| 4163 | } | 4153 | } |
| 4164 | | 4154 | |
| 4165 | static LLVMValueRef render_shl_with_overflow(CodeGen *g, IrInstructionOverflowOp *instruction) { | 4155 | static LLVMValueRef render_shl_with_overflow(CodeGen *g, IrInstructionOverflowOp *instruction) { |