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
@@ -3070,7 +3070,7 @@ fn F() {
// CHECK:STDOUT: %.loc14_14: ref %B = value_as_ref %x.ref.loc14_14
// CHECK:STDOUT: %addr.loc14_12.2: %ptr.a04 = addr_of %.loc14_14
// CHECK:STDOUT: %operator+__carbon_thunk.call: init %i32 = call imports.%operator+__carbon_thunk.decl(%addr.loc14_12.1, %addr.loc14_12.2)
// CHECK:STDOUT: return %operator+__carbon_thunk.call to %return
// CHECK:STDOUT: return %operator+__carbon_thunk.call to %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- import_overloading.carbon