mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AllocBoxToStack: Promote the last release of a box to destroy_addr.
Swift SVN r9046
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user