diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO/MergeFunctions.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/MergeFunctions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp index 550750d1743..30fe9bbbe61 100644 --- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp +++ b/llvm/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<Instruction>(U)) { - remove(I->getParent()->getParent()); + remove(I->getFunction()); } else if (isa<GlobalValue>(U)) { // do nothing } else if (Constant *C = dyn_cast<Constant>(U)) { |