Lowering of Branch / BranchIf / BranchWithArg / BlockArg. (#2904)

This gives us complete lowering of `if` expressions plus `and` and `or`.

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
Richard Smith
2023-06-15 17:53:07 -07:00
committed by GitHub
co-authored by Jon Ross-Perkins
parent c27f41c94b
commit 0d4d392d12
44 changed files with 453 additions and 91 deletions
@@ -68,7 +68,8 @@ auto SemanticsHandleIfExpressionElse(SemanticsContext& context,
// Obtain the value in the resumption block and push it.
context.AddNodeAndPush(
if_node, SemanticsNode::BlockArg::Make(if_node, result_type_id));
if_node,
SemanticsNode::BlockArg::Make(if_node, result_type_id, resume_block_id));
return true;
}