Commits

Chris Lattner committed 7db7d4a813a
Three changes: - constify the Initialization::getAddressOrNull/hasAddress functions. - Teach the initialization logic that 'let' initializations can be split into tuple subelements by address (i.e. i getSubInitializationsForTuple works on them) when the let decl has a backing memory allocation. - Teach LetValueInitialization to produce a backing memory object for address-only tuple arguments, since they are passed as multiple SILArguments and need some place in memory to reassemble them. The collection fixes a bad miscompilation where the RValue logic emitted a temporary (through getSingleValue) which we then accidentally lifetime extended for the duration of the argument. This led to bad things when the temporary got destroyed too early. Thanks to MichaelG for helping narrow down this problem, it initially looked like a sil optimizer bug. Swift SVN r12234