aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-24 22:45:10 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-03-24 22:45:10 -0700
commit7f91be9c80f8d79e4a2c6cf0b15197cdd454cef6 (patch)
tree3356aeb0462c236f4e9af621415ad4582ea4f832 /src
parentbcf2eb1a003d076c166d4ce9cba20f6ed9b53887 (diff)
downloadzig-7f91be9c80f8d79e4a2c6cf0b15197cdd454cef6.tar.gz
zig-7f91be9c80f8d79e4a2c6cf0b15197cdd454cef6.zip
AstGen: emit break_inline from inline while loop
Diffstat (limited to 'src')
-rw-r--r--src/AstGen.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig
index aba4610c5d..e0f4028cba 100644
--- a/src/AstGen.zig
+++ b/src/AstGen.zig
@@ -1878,8 +1878,8 @@ fn continueExpr(parent_gz: *GenZir, parent_scope: *Scope, node: Ast.Node.Index)
continue;
}
- // TODO emit a break_inline if the loop being continued is inline
- _ = try parent_gz.addBreak(.@"break", continue_block, .void_value);
+ const break_tag: Zir.Inst.Tag = if (gen_zir.is_inline) .break_inline else .@"break";
+ _ = try parent_gz.addBreak(break_tag, continue_block, .void_value);
return Zir.Inst.Ref.unreachable_value;
},
.local_val => scope = scope.cast(Scope.LocalVal).?.parent,