aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-06-18 17:43:05 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-06-18 17:43:05 -0400
commit79671efd3a5b67e359aa60c66e4007c03342b28e (patch)
tree410d812c520924418e326497e5343dd431a37d01 /src/ir.cpp
parente27da17ff2cc45c93ab95defd937fd8038751b51 (diff)
downloadzig-79671efd3a5b67e359aa60c66e4007c03342b28e.tar.gz
zig-79671efd3a5b67e359aa60c66e4007c03342b28e.zip
fix inline loop behavior with variable result loc
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 4d2221ab39..83199fc0cc 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -15157,9 +15157,14 @@ static void ir_reset_result(ResultLoc *result_loc) {
}
break;
}
+ case ResultLocIdVar: {
+ IrInstructionAllocaSrc *alloca_src =
+ reinterpret_cast<IrInstructionAllocaSrc *>(result_loc->source_instruction);
+ alloca_src->base.child = nullptr;
+ break;
+ }
case ResultLocIdPeer:
case ResultLocIdNone:
- case ResultLocIdVar:
case ResultLocIdReturn:
case ResultLocIdInstruction:
case ResultLocIdBitCast: