diff options
| author | kristopher tate <kt@connectfree.co.jp> | 2018-07-28 15:20:56 +0900 |
|---|---|---|
| committer | kristopher tate <kt@connectfree.co.jp> | 2018-08-02 16:50:08 +0900 |
| commit | 0ee65025623c0440ed655d68b579f17e6d6e5f5c (patch) | |
| tree | 83c3eac2fffd756292582d90c8bd319e4c15fdda /src/codegen.cpp | |
| parent | 81f463626ad09dd09e525cda140fb63baf11bc73 (diff) | |
| download | zig-0ee65025623c0440ed655d68b579f17e6d6e5f5c.tar.gz zig-0ee65025623c0440ed655d68b579f17e6d6e5f5c.zip | |
src/codegen.cpp: remove `add_node_error` from `ir_render_handle`;
Tracking Issue #1296 ;
Thanks @andrewrk ;
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 43e2a0b694..8a18a3f8dd 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4149,17 +4149,7 @@ static LLVMValueRef ir_render_frame_address(CodeGen *g, IrExecutable *executable static LLVMValueRef ir_render_handle(CodeGen *g, IrExecutable *executable, IrInstructionHandle *instruction) { - - bool is_async = executable->fn_entry != nullptr && - executable->fn_entry->type_entry->data.fn.fn_type_id.cc == CallingConventionAsync; - - if (!is_async || !executable->coro_handle) { - add_node_error(g, instruction->base.source_node, buf_sprintf("@handle() in non-async function")); - return LLVMConstNull(g->builtin_types.entry_promise->type_ref); - } - - LLVMValueRef handle = ir_llvm_value(g, executable->coro_handle); - return LLVMBuildRet(g->builder, handle); + return LLVMConstNull(g->builtin_types.entry_promise->type_ref); } static LLVMValueRef render_shl_with_overflow(CodeGen *g, IrInstructionOverflowOp *instruction) { |
