AllocBoxToStack: Promote the last release of a box to destroy_addr.

Swift SVN r9046
This commit is contained in:
Joe Groff
2013-10-09 01:09:36 +00:00
parent 2099abfa5d
commit ad0ee9b5ca
2 changed files with 2 additions and 2 deletions

View File

@@ -227,7 +227,7 @@ static bool optimizeAllocBox(AllocBoxInst *ABI,
SILBuilder B2(LastRelease);
if (!lowering.isTrivial() && !isa<DeallocBoxInst>(LastRelease))
lowering.emitDestroyAddress(B2, ABI->getLoc(), ASI->getAddressResult());
B2.emitDestroyAddr(ABI->getLoc(), ASI->getAddressResult());
// Reset the insertion point in case the destroy address expanded to
// multiple blocks.