mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The result-reabstraction code doesn't need to handle cleanups properly during the planning phase because of course we don't have any values yet. That is not true of argument reabstraction, so we need to make sure that the recursive emitters can produce values with cleanups so that we can collect and forward those cleanups correctly when emitting the call. As part of this, I've changed the code so that it should forward outer addresses to inner address more consistently; it wouldn't have done this before if we were breaking apart or assembling a pack. I'm not sure I can directly test this without figuring out a way to get SILGen to reabstract both sides of a function, though. I'm not sure this is really doing borrowed vs owned arguments correctly, if e.g. we need to rebstract one component of a tuple that's otherwise borrowed.
15 KiB
15 KiB