[MergeFunc] Use Instruction::getFunction as a cleanup, NFC

llvm-svn: 350938
This commit is contained in:
Vedant Kumar 2019-01-11 17:56:21 +00:00
parent cfdbad065e
commit 08fe7e02fb
1 changed files with 2 additions and 2 deletions

View File

@ -474,7 +474,7 @@ void MergeFunctions::replaceDirectCallers(Function *Old, Function *New) {
NewPAL.getRetAttributes(),
NewArgAttrs));
remove(CS.getInstruction()->getParent()->getParent());
remove(CS.getInstruction()->getFunction());
U->set(BitcastNew);
}
}
@ -954,7 +954,7 @@ void MergeFunctions::removeUsers(Value *V) {
for (User *U : V->users()) {
if (Instruction *I = dyn_cast<Instruction>(U)) {
remove(I->getParent()->getParent());
remove(I->getFunction());
} else if (isa<GlobalValue>(U)) {
// do nothing
} else if (Constant *C = dyn_cast<Constant>(U)) {