diff options
author | Vedant Kumar <vsk@apple.com> | 2019-01-11 17:56:21 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2019-01-11 17:56:21 +0000 |
commit | 08fe7e02fba6206c196d5e8527f8b40bb17941ad (patch) | |
tree | 7bfa63ef0536e7342b57391e7b68cb92775a8990 /llvm/lib/Transforms/IPO/MergeFunctions.cpp | |
parent | cfdbad065e4ad08566a7d2a8d128310252a81f0f (diff) | |
download | bcm5719-llvm-08fe7e02fba6206c196d5e8527f8b40bb17941ad.tar.gz bcm5719-llvm-08fe7e02fba6206c196d5e8527f8b40bb17941ad.zip |
[MergeFunc] Use Instruction::getFunction as a cleanup, NFC
llvm-svn: 350938
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)) { |