add a new CallGraphNode::replaceCallEdge method and use it from
[oota-llvm.git] / include / llvm / Analysis / CallGraph.h
index 1d23c695ad44f81cc364839608eb1991259939f6..bcb6dee033dcd6dd1960e39bfd7aba336d07fb84 100644 (file)
@@ -270,6 +270,12 @@ public:
   /// removeOneAbstractEdgeTo - Remove one edge associated with a null callsite
   /// from this node to the specified callee function.
   void removeOneAbstractEdgeTo(CallGraphNode *Callee);
+  
+  /// replaceCallEdge - This method replaces the edge in the node for the
+  /// specified call site with a new one.  Note that this method takes linear
+  /// time, so it should be used sparingly.
+  void replaceCallEdge(CallSite CS, CallSite NewCS, CallGraphNode *NewNode);
+  
 };
 
 //===----------------------------------------------------------------------===//