From d559263f4a6ee78224ddca3014a75cdf9dcb4afe Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Fri, 11 Jan 2019 17:56:21 +0000 Subject: [PATCH] [MergeFunc] Use Instruction::getFunction as a cleanup, NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350938 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/MergeFunctions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/IPO/MergeFunctions.cpp b/lib/Transforms/IPO/MergeFunctions.cpp index 550750d1743..30fe9bbbe61 100644 --- a/lib/Transforms/IPO/MergeFunctions.cpp +++ b/lib/Transforms/IPO/MergeFunctions.cpp @@ -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(U)) { - remove(I->getParent()->getParent()); + remove(I->getFunction()); } else if (isa(U)) { // do nothing } else if (Constant *C = dyn_cast(U)) { -- 2.50.1