Use std::vector rather than SmallVector here because SmallVector
[oota-llvm.git] / include / llvm / CallGraphSCCPass.h
index 3cff8f2006aa3287b2b43e482b3e08806321b01c..e11b9677c74af1b39d1d8a0895ff5694ba0a3c4d 100644 (file)
@@ -93,15 +93,7 @@ public:
   
   /// ReplaceNode - This informs the SCC and the pass manager that the specified
   /// Old node has been deleted, and New is to be used in its place.
-  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");
-  }
+  void ReplaceNode(CallGraphNode *Old, CallGraphNode *New);
   
   typedef std::vector<CallGraphNode*>::const_iterator iterator;
   iterator begin() const { return Nodes.begin(); }