mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 16:21:04 +01:00
Always build ReturnTypeInfo from a function (#6490)
This is a step toward using it to represent the return form, not just the return type.
This commit is contained in:
@@ -315,11 +315,11 @@ auto FunctionContext::GetInitRepr(TypeInFile type) -> SemIR::InitRepr {
|
||||
return result;
|
||||
}
|
||||
|
||||
auto FunctionContext::GetReturnTypeInfo(TypeInFile type)
|
||||
auto FunctionContext::GetReturnTypeInfo(InstInFile callee)
|
||||
-> ReturnTypeInfoInFile {
|
||||
ReturnTypeInfoInFile result = {
|
||||
.file = type.file,
|
||||
.info = SemIR::ReturnTypeInfo::ForType(*type.file, type.type_id)};
|
||||
.file = callee.file,
|
||||
.info = SemIR::ReturnTypeInfo::ForCallee(*callee.file, callee.inst_id)};
|
||||
AddEnumToCurrentFingerprint(result.info.init_repr.kind);
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user