projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfdbad0
)
[MergeFunc] Use Instruction::getFunction as a cleanup, NFC
author
Vedant Kumar
<vsk@apple.com>
Fri, 11 Jan 2019 17:56:21 +0000
(17:56 +0000)
committer
Vedant Kumar
<vsk@apple.com>
Fri, 11 Jan 2019 17:56:21 +0000
(17:56 +0000)
llvm-svn: 350938
llvm/lib/Transforms/IPO/MergeFunctions.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/IPO/MergeFunctions.cpp
b/llvm/lib/Transforms/IPO/MergeFunctions.cpp
index
550750d
..
30fe9bb
100644
(file)
--- 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()->get
Parent()->getParent
());
+ remove(CS.getInstruction()->get
Function
());
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->get
Parent()->getParent
());
+ remove(I->get
Function
());
} else if (isa<GlobalValue>(U)) {
// do nothing
} else if (Constant *C = dyn_cast<Constant>(U)) {