summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/PruneEH.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2019-04-19 05:59:42 +0000
committerChandler Carruth <chandlerc@gmail.com>2019-04-19 05:59:42 +0000
commitce3f75df1fffdb8bcef66ff82e83fa895e00260e (patch)
treec18d789929358501b909110e07e9a0df414b6717 /llvm/lib/Transforms/IPO/PruneEH.cpp
parent82216048e6bcdf2e37b356e45954ac8cdceaab50 (diff)
downloadbcm5719-llvm-ce3f75df1fffdb8bcef66ff82e83fa895e00260e.tar.gz
bcm5719-llvm-ce3f75df1fffdb8bcef66ff82e83fa895e00260e.zip
[CallSite removal] Move the legacy PM, call graph, and some inliner
code to `CallBase`. This patch focuses on the legacy PM, call graph, and some of inliner and legacy passes interacting with those APIs from `CallSite` to the new `CallBase` class. No interesting changes. Differential Revision: https://reviews.llvm.org/D60412 llvm-svn: 358739
Diffstat (limited to 'llvm/lib/Transforms/IPO/PruneEH.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/PruneEH.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/PruneEH.cpp b/llvm/lib/Transforms/IPO/PruneEH.cpp
index ef7b43e8b55..cb3915dfb67 100644
--- a/llvm/lib/Transforms/IPO/PruneEH.cpp
+++ b/llvm/lib/Transforms/IPO/PruneEH.cpp
@@ -242,12 +242,12 @@ static void DeleteBasicBlock(BasicBlock *BB, CallGraph &CG) {
break;
}
- if (auto CS = CallSite (&*I)) {
- const Function *Callee = CS.getCalledFunction();
+ if (auto *Call = dyn_cast<CallBase>(&*I)) {
+ const Function *Callee = Call->getCalledFunction();
if (!Callee || !Intrinsic::isLeaf(Callee->getIntrinsicID()))
- CGN->removeCallEdgeFor(CS);
+ CGN->removeCallEdgeFor(*Call);
else if (!Callee->isIntrinsic())
- CGN->removeCallEdgeFor(CS);
+ CGN->removeCallEdgeFor(*Call);
}
if (!I->use_empty())
OpenPOWER on IntegriCloud