mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Initial support for return forms (#6556)
The main changes here are: - Introducing `InitForm` and `RefForm` to represent initializing and reference forms (the two return forms currently supported by the parser). - Introducing the `FormType` singleton inst to represent their type (i.e. `Core.Form`). - Emitting an inst representing a function's declared return form as part of handling the function signature. The return form inst is currently ignored. Subsequent PRs will expose it in `SemIR::Function` and use it to determine the form of call expressions.
This commit is contained in:
@@ -73,7 +73,7 @@ auto Context::VerifyOnFinish() const -> void {
|
||||
vtable_stack_.VerifyOnFinish();
|
||||
region_stack_.VerifyOnFinish();
|
||||
CARBON_CHECK(impl_lookup_stack_.empty());
|
||||
CARBON_CHECK(return_type_inst_id_ == std::nullopt);
|
||||
CARBON_CHECK(return_form_expr_ == std::nullopt);
|
||||
|
||||
#ifndef NDEBUG
|
||||
if (auto verify = sem_ir_->Verify(); !verify.ok()) {
|
||||
|
||||
Reference in New Issue
Block a user