Delete User::dropHungOffUses and move it in to ~User which is the only caller. NFC.

Now that the subclasses which care about hung off uses let ~User clean it up,
there's no need for a separate method.  Just inline it to ~User and delete it.

Reviewed by Duncan Exon Smith.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239491 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Pete Cooper
2015-06-10 22:38:38 +00:00
parent 0aae8ce09f
commit 0fa7dc6b36
3 changed files with 9 additions and 28 deletions

View File

@@ -93,10 +93,6 @@ PHINode::PHINode(const PHINode &PN)
SubclassOptionalData = PN.SubclassOptionalData;
}
PHINode::~PHINode() {
dropHungoffUses();
}
// removeIncomingValue - Remove an incoming value. This is useful if a
// predecessor basic block is deleted.
Value *PHINode::removeIncomingValue(unsigned Idx, bool DeletePHIIfEmpty) {
@@ -190,10 +186,6 @@ LandingPadInst::LandingPadInst(const LandingPadInst &LP)
setCleanup(LP.isCleanup());
}
LandingPadInst::~LandingPadInst() {
dropHungoffUses();
}
LandingPadInst *LandingPadInst::Create(Type *RetTy, Value *PersonalityFn,
unsigned NumReservedClauses,
const Twine &NameStr,
@@ -3325,10 +3317,6 @@ SwitchInst::SwitchInst(const SwitchInst &SI)
SubclassOptionalData = SI.SubclassOptionalData;
}
SwitchInst::~SwitchInst() {
dropHungoffUses();
}
/// addCase - Add an entry to the switch instruction...
///
@@ -3450,10 +3438,6 @@ IndirectBrInst::IndirectBrInst(const IndirectBrInst &IBI)
SubclassOptionalData = IBI.SubclassOptionalData;
}
IndirectBrInst::~IndirectBrInst() {
dropHungoffUses();
}
/// addDestination - Add a destination.
///
void IndirectBrInst::addDestination(BasicBlock *DestBB) {