Replace GetCurrentReturnSlot with GetReturnedVarParam (#6571)

Not all functions have a return slot, and once we have composite forms,
functions will be able to have any number of return slots. Obtaining a
unique return slot for a function only makes sense in `returned var`
handling.
This commit is contained in:
Geoff Romer
2026-01-10 01:56:32 +00:00
committed by GitHub
parent 3c70a9f59b
commit 6985ecb1d4
219 changed files with 1097 additions and 1089 deletions
+2 -2
View File
@@ -62,9 +62,9 @@ fn Main() {
// CHECK:STDOUT: fn @Echo(%a.param: %empty_tuple.type) -> %empty_tuple.type {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %a.ref: %empty_tuple.type = name_ref a, %a
// CHECK:STDOUT: %.loc16_10: init %empty_tuple.type = tuple_init () to %return [concrete = constants.%empty_tuple]
// CHECK:STDOUT: %.loc16_10: init %empty_tuple.type = tuple_init () to %return.param [concrete = constants.%empty_tuple]
// CHECK:STDOUT: %.loc16_11: init %empty_tuple.type = converted %a.ref, %.loc16_10 [concrete = constants.%empty_tuple]
// CHECK:STDOUT: return %.loc16_11 to %return
// CHECK:STDOUT: return %.loc16_11 to %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {