Skip to content

Commit 46ed599

Browse files
authored
Merge pull request #10145 from gottesmm/plugging_leaks_1
[sil] Change two SILInstruction::removeFromParent => SILInstruction::eraseFromParent.
2 parents af2aca0 + 5fa67e0 commit 46ed599

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

include/swift/SIL/SILBasicBlock.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,8 @@ struct ilist_traits<::swift::SILBasicBlock>
425425
public:
426426
static void deleteNode(SILBasicBlock *BB) { BB->~SILBasicBlock(); }
427427

428-
void addNodeToList(SILBasicBlock *BB) {}
429-
430428
void transferNodesFromList(ilist_traits<SILBasicBlock> &SrcTraits,
431429
block_iterator First, block_iterator Last);
432-
433430
private:
434431
static void createNode(const SILBasicBlock &);
435432
};

lib/SIL/SILBuilder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ SILValue SILBuilder::emitThickToObjCMetatype(SILLocation Loc, SILValue Op,
364364
if (metatypeInst->use_empty() &&
365365
metatypeInst->getParent() == getInsertionBB()) {
366366
auto origLoc = metatypeInst->getLoc();
367-
metatypeInst->removeFromParent();
367+
metatypeInst->eraseFromParent();
368368
return createMetatype(origLoc, Ty);
369369
}
370370
}
@@ -382,7 +382,7 @@ SILValue SILBuilder::emitObjCToThickMetatype(SILLocation Loc, SILValue Op,
382382
if (metatypeInst->use_empty() &&
383383
metatypeInst->getParent() == getInsertionBB()) {
384384
auto origLoc = metatypeInst->getLoc();
385-
metatypeInst->removeFromParent();
385+
metatypeInst->eraseFromParent();
386386
return createMetatype(origLoc, Ty);
387387
}
388388
}

0 commit comments

Comments
 (0)