Move GetTypeInInstance from Check to SemIR. (#4144)

In preparation for this function being used by other parts of `SemIR`
and by lowering.
This commit is contained in:
Richard Smith
2024-07-17 23:27:14 +00:00
committed by GitHub
parent dde0bd0ffe
commit 3cc90f9017
7 changed files with 19 additions and 25 deletions
+3 -2
View File
@@ -279,8 +279,9 @@ static auto BuildFunctionDecl(Context& context,
// substitution is ready.
if (return_storage_id.is_valid()) {
auto return_storage = context.insts().Get(return_storage_id);
return_storage.SetType(GetTypeInInstance(
context, SemIR::GenericInstanceId::Invalid, return_storage.type_id()));
return_storage.SetType(SemIR::GetTypeInInstance(
context.sem_ir(), SemIR::GenericInstanceId::Invalid,
return_storage.type_id()));
context.sem_ir().insts().Set(return_storage_id, return_storage);
}