From c94fe21a56f9e4e5ebbe99252a25636c36392509 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Fri, 5 Sep 2008 21:43:04 +0000 Subject: Delete the removeCallEdgeTo callgraph method, because it does not maintain a correct list of callsites. I discovered (see following commit) that the inliner will create a wrong callgraph if it is fed a callgraph with correct edges but incorrect callsites. These were created by Prune-EH, and while it wasn't done via removeCallEdgeTo, it could have been done via removeCallEdgeTo, which is an accident waiting to happen. Use removeCallEdgeFor instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55859 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/CallGraph.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'include/llvm/Analysis/CallGraph.h') diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index 5fd0bdc8a0..a04c775755 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -214,17 +214,12 @@ public: CalledFunctions.clear(); } - /// addCalledFunction add a function to the list of functions called by this + /// addCalledFunction - Add a function to the list of functions called by this /// one. void addCalledFunction(CallSite CS, CallGraphNode *M) { CalledFunctions.push_back(std::make_pair(CS, M)); } - /// removeCallEdgeTo - This method removes a *single* edge to the specified - /// callee function. Note that this method takes linear time, so it should be - /// used sparingly. - void removeCallEdgeTo(CallGraphNode *Callee); - /// removeCallEdgeFor - This method removes the edge in the node for the /// specified call site. Note that this method takes linear time, so it /// should be used sparingly. -- cgit v1.2.3-18-g5258