mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 17:36:43 +00: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:
1 parent
4197e6ca63
commit
2078721e1c
12 files changed
+80
-56
No files matched your search
@@ -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