authorgravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-07-28 23:29:40+09:00
committergravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-08-02 16:50:08+09:00
log104bdb03d6b5906716efeb84045079a424bf650a
treea892a1daa6862ee93c8f56c8e2b7bcdc78f23a8e
parenta8ea2360958354ba8310c7cea388351299e72e44

src/codegen.cpp: return promise instead of null promise;

Tracking Issue #1296 ;

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

src/codegen.cpp+2-1
...@@ -4149,7 +4149,8 @@ static LLVMValueRef ir_render_frame_address(CodeGen *g, IrExecutable *executable...@@ -4149,7 +4149,8 @@ static LLVMValueRef ir_render_frame_address(CodeGen *g, IrExecutable *executable
4149static LLVMValueRef ir_render_handle(CodeGen *g, IrExecutable *executable,4149static LLVMValueRef ir_render_handle(CodeGen *g, IrExecutable *executable,
4150 IrInstructionHandle *instruction)4150 IrInstructionHandle *instruction)
4151{4151{
4152 return LLVMConstNull(g->builtin_types.entry_promise->type_ref);4152 LLVMValueRef ptr = ir_llvm_value(g, executable->fn_entry->ir_executable.coro_handle->other);
4153 return LLVMBuildBitCast(g->builder, ptr, g->builtin_types.entry_promise->type_ref, "");
4153}4154}
41544155
4155static LLVMValueRef render_shl_with_overflow(CodeGen *g, IrInstructionOverflowOp *instruction) {4156static LLVMValueRef render_shl_with_overflow(CodeGen *g, IrInstructionOverflowOp *instruction) {