@@ -1352,7 +1352,6 @@ void CallEmission::emitToExplosion(Explosion &out) {
1352
1352
1353
1353
Initialization init;
1354
1354
InitializedObject obj = init.getObjectForTemporary ();
1355
- auto cleanup = init.registerObject (IGF, obj, NotOnHeap, substResultTI);
1356
1355
Address temp = init.emitLocalAllocation (IGF, obj, NotOnHeap, substResultTI,
1357
1356
" call.aggresult" );
1358
1357
emitToMemory (temp, substResultTI);
@@ -1363,10 +1362,10 @@ void CallEmission::emitToExplosion(Explosion &out) {
1363
1362
if (substSchema.isSingleAggregate ()) {
1364
1363
auto substType = substSchema.begin ()->getAggregateType ()->getPointerTo ();
1365
1364
temp = IGF.Builder .CreateBitCast (temp, substType);
1366
- out.add (ManagedValue (temp.getAddress (), cleanup ));
1365
+ out.add (ManagedValue (temp.getAddress ()));
1367
1366
1368
- // Otherwise, we need to load. Do a take-load and deactivate the cleanup.
1369
1367
} else {
1368
+ // Otherwise, we need to load.
1370
1369
substResultTI.loadAsTake (IGF, temp, out);
1371
1370
}
1372
1371
return ;
@@ -1498,7 +1497,6 @@ void CallEmission::forceCallee() {
1498
1497
// Allocate the temporary.
1499
1498
Initialization init;
1500
1499
auto object = init.getObjectForTemporary ();
1501
- init.registerObjectWithoutDestroy (object);
1502
1500
Address addr = init.emitLocalAllocation (IGF, object, NotOnHeap, substTI,
1503
1501
" polymorphic-currying-temp" )
1504
1502
.getUnownedAddress ();
@@ -1553,7 +1551,6 @@ void CallEmission::externalizeArgument(Explosion &out, Explosion &in,
1553
1551
if (requiresExternalByvalArgument (IGF.IGM , ty)) {
1554
1552
Initialization I;
1555
1553
InitializedObject object = I.getObjectForTemporary ();
1556
- I.registerObject (IGF, object, NotOnHeap, ti);
1557
1554
OwnedAddress addr = ti.allocate (IGF,
1558
1555
I,
1559
1556
object,
@@ -1767,7 +1764,6 @@ void IRGenFunction::emitPrologue() {
1767
1764
// work in the normal way.
1768
1765
Initialization returnInit;
1769
1766
auto returnObject = returnInit.getObjectForTemporary ();
1770
- returnInit.registerObjectWithoutDestroy (returnObject);
1771
1767
1772
1768
// Allocate the slot and leave its allocation cleanup hanging
1773
1769
// around.
0 commit comments