aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-08-15 15:06:05 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-08-15 15:06:05 -0400
commit55f5cee86b39bb2127a316f9b5d0abf532580cac (patch)
treea9bce15a8899632cf527b980c8fc27280bd9dca0 /src/ir.cpp
parent13b5a4bf8ca65c569e6b28ca0e41d101d12d0ff1 (diff)
downloadzig-55f5cee86b39bb2127a316f9b5d0abf532580cac.tar.gz
zig-55f5cee86b39bb2127a316f9b5d0abf532580cac.zip
fix error return traces for async calls of blocking functions
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 3e80fad270..ddaf82893a 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -22078,6 +22078,10 @@ static IrInstruction *ir_analyze_instruction_frame_handle(IrAnalyze *ira, IrInst
ZigFn *fn = exec_fn_entry(ira->new_irb.exec);
ir_assert(fn != nullptr, &instruction->base);
+ if (fn->inferred_async_node == nullptr) {
+ fn->inferred_async_node = instruction->base.source_node;
+ }
+
ZigType *frame_type = get_fn_frame_type(ira->codegen, fn);
ZigType *ptr_frame_type = get_pointer_to_type(ira->codegen, frame_type, false);