mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 08:34:43 +01:00
Refactor function return type representation (#6463)
This separates the return type from the return pattern, and replaces the return pattern with a block of return patterns. This is a step toward support for `ref` returns (where there's no corresponding return pattern) and compund-form returns (where there may be multiple return patterns).
This commit is contained in:
@@ -49,7 +49,8 @@ auto GlobalInit::Finalize() -> void {
|
||||
.non_owning_decl_id = SemIR::InstId::None,
|
||||
.first_owning_decl_id = SemIR::InstId::None},
|
||||
{.call_params_id = SemIR::InstBlockId::Empty,
|
||||
.return_slot_pattern_id = SemIR::InstId::None,
|
||||
.return_type_inst_id = SemIR::TypeInstId::None,
|
||||
.return_patterns_id = SemIR::InstBlockId::None,
|
||||
.body_block_ids = {SemIR::InstBlockId::GlobalInit}}}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user