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 authored and GitHub committed 2024-07-17 23:27:14 +00:00
1 parent dde0bd0ffe
commit 3cc90f9017
7 files changed
+19 -25

No files matched your search

+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);
}