mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-27 00:33:56 +00:00
Add #branch_location
This commit is contained in:
@@ -476,8 +476,8 @@ gb_internal lbValue lb_emit_or_else(lbProcedure *p, Ast *arg, Ast *else_expr, Ty
|
||||
}
|
||||
}
|
||||
|
||||
gb_internal void lb_build_return_stmt(lbProcedure *p, Slice<Ast *> const &return_results);
|
||||
gb_internal void lb_build_return_stmt_internal(lbProcedure *p, lbValue res);
|
||||
gb_internal void lb_build_return_stmt(lbProcedure *p, Slice<Ast *> const &return_results, TokenPos pos);
|
||||
gb_internal void lb_build_return_stmt_internal(lbProcedure *p, lbValue res, TokenPos pos);
|
||||
|
||||
gb_internal lbValue lb_emit_or_return(lbProcedure *p, Ast *arg, TypeAndValue const &tv) {
|
||||
lbValue lhs = {};
|
||||
@@ -506,10 +506,10 @@ gb_internal lbValue lb_emit_or_return(lbProcedure *p, Ast *arg, TypeAndValue con
|
||||
lbValue found = map_must_get(&p->module->values, end_entity);
|
||||
lb_emit_store(p, found, rhs);
|
||||
|
||||
lb_build_return_stmt(p, {});
|
||||
lb_build_return_stmt(p, {}, ast_token(arg).pos);
|
||||
} else {
|
||||
GB_ASSERT(tuple->variables.count == 1);
|
||||
lb_build_return_stmt_internal(p, rhs);
|
||||
lb_build_return_stmt_internal(p, rhs, ast_token(arg).pos);
|
||||
}
|
||||
}
|
||||
lb_start_block(p, continue_block);
|
||||
|
||||
Reference in New Issue
Block a user