- void ReplaceNode(CallGraphNode *Old, CallGraphNode *New) {
- assert(Old != New && "Should not replace node with self");
- for (unsigned i = 0, e = Nodes.size(); i != e; ++i)
- if (Nodes[i] == Old) {
- Nodes[i] = New;
- return;
- }
- assert(0 && "Node not in SCC");
- }