From ce3f75df1fffdb8bcef66ff82e83fa895e00260e Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 19 Apr 2019 05:59:42 +0000 Subject: [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 --- llvm/lib/Transforms/IPO/PruneEH.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Transforms/IPO/PruneEH.cpp') 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(&*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()) -- cgit v1.2.3