aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkristopher tate <kt@connectfree.co.jp>2018-07-28 23:29:40 +0900
committerkristopher tate <kt@connectfree.co.jp>2018-08-02 16:50:08 +0900
commit104bdb03d6b5906716efeb84045079a424bf650a (patch)
treea892a1daa6862ee93c8f56c8e2b7bcdc78f23a8e /src
parenta8ea2360958354ba8310c7cea388351299e72e44 (diff)
downloadzig-104bdb03d6b5906716efeb84045079a424bf650a.tar.gz
zig-104bdb03d6b5906716efeb84045079a424bf650a.zip
src/codegen.cpp: return promise instead of null promise;
Tracking Issue #1296 ;
Diffstat (limited to 'src')
-rw-r--r--src/codegen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 54effb9480..bd708e3824 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -4149,7 +4149,8 @@ static LLVMValueRef ir_render_frame_address(CodeGen *g, IrExecutable *executable
static LLVMValueRef ir_render_handle(CodeGen *g, IrExecutable *executable,
IrInstructionHandle *instruction)
{
- return LLVMConstNull(g->builtin_types.entry_promise->type_ref);
+ LLVMValueRef ptr = ir_llvm_value(g, executable->fn_entry->ir_executable.coro_handle->other);
+ return LLVMBuildBitCast(g->builder, ptr, g->builtin_types.entry_promise->type_ref, "");
}
static LLVMValueRef render_shl_with_overflow(CodeGen *g, IrInstructionOverflowOp *instruction) {