@@ -138,16 +138,6 @@ void CallGraph::print(raw_ostream &OS) const {
138
138
LLVM_DUMP_METHOD void CallGraph::dump () const { print (dbgs ()); }
139
139
#endif
140
140
141
- void CallGraph::ReplaceExternalCallEdge (CallGraphNode *Old,
142
- CallGraphNode *New) {
143
- for (auto &CR : ExternalCallingNode->CalledFunctions )
144
- if (CR.second == Old) {
145
- CR.second ->DropRef ();
146
- CR.second = New;
147
- CR.second ->AddRef ();
148
- }
149
- }
150
-
151
141
// removeFunctionFromModule - Unlink the function from this module, returning
152
142
// it. Because this removes the function from the module, the call graph node
153
143
// is destroyed. This is only valid if the function does not call any other
@@ -203,39 +193,6 @@ void CallGraphNode::print(raw_ostream &OS) const {
203
193
LLVM_DUMP_METHOD void CallGraphNode::dump () const { print (dbgs ()); }
204
194
#endif
205
195
206
- // / removeCallEdgeFor - This method removes the edge in the node for the
207
- // / specified call site. Note that this method takes linear time, so it
208
- // / should be used sparingly.
209
- void CallGraphNode::removeCallEdgeFor (CallBase &Call) {
210
- for (CalledFunctionsVector::iterator I = CalledFunctions.begin (); ; ++I) {
211
- assert (I != CalledFunctions.end () && " Cannot find callsite to remove!" );
212
- if (I->first && *I->first == &Call) {
213
- I->second ->DropRef ();
214
- *I = CalledFunctions.back ();
215
- CalledFunctions.pop_back ();
216
-
217
- // Remove all references to callback functions if there are any.
218
- forEachCallbackFunction (Call, [=](Function *CB) {
219
- removeOneAbstractEdgeTo (CG->getOrInsertFunction (CB));
220
- });
221
- return ;
222
- }
223
- }
224
- }
225
-
226
- // removeAnyCallEdgeTo - This method removes any call edges from this node to
227
- // the specified callee function. This takes more time to execute than
228
- // removeCallEdgeTo, so it should not be used unless necessary.
229
- void CallGraphNode::removeAnyCallEdgeTo (CallGraphNode *Callee) {
230
- for (unsigned i = 0 , e = CalledFunctions.size (); i != e; ++i)
231
- if (CalledFunctions[i].second == Callee) {
232
- Callee->DropRef ();
233
- CalledFunctions[i] = CalledFunctions.back ();
234
- CalledFunctions.pop_back ();
235
- --i; --e;
236
- }
237
- }
238
-
239
196
// / removeOneAbstractEdgeTo - Remove one edge associated with a null callsite
240
197
// / from this node to the specified callee function.
241
198
void CallGraphNode::removeOneAbstractEdgeTo (CallGraphNode *Callee) {
0 commit comments