X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FCallGraphSCCPass.h;h=7154aa3259d2927350bb8d282c109764245bb603;hb=35fcd6557f53aab69c2990b80fed4653fbaa3473;hp=3cff8f2006aa3287b2b43e482b3e08806321b01c;hpb=2decb22222cac46bb1d9163e7b89d7e5be8ef65f;p=oota-llvm.git diff --git a/include/llvm/CallGraphSCCPass.h b/include/llvm/CallGraphSCCPass.h index 3cff8f2006a..7154aa3259d 100644 --- a/include/llvm/CallGraphSCCPass.h +++ b/include/llvm/CallGraphSCCPass.h @@ -33,8 +33,7 @@ class CallGraphSCC; class CallGraphSCCPass : public Pass { public: - explicit CallGraphSCCPass(intptr_t pid) : Pass(PT_CallGraphSCC, pid) {} - explicit CallGraphSCCPass(void *pid) : Pass(PT_CallGraphSCC, pid) {} + explicit CallGraphSCCPass(char &pid) : Pass(PT_CallGraphSCC, pid) {} /// createPrinterPass - Get a pass that prints the Module /// corresponding to a CallGraph. @@ -64,7 +63,7 @@ public: /// Assign pass manager to manager this pass virtual void assignPassManager(PMStack &PMS, - PassManagerType PMT =PMT_CallGraphPassManager); + PassManagerType PMT); /// Return what kind of Pass Manager can manage this pass. virtual PassManagerType getPotentialPassManagerType() const { @@ -93,15 +92,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::const_iterator iterator; iterator begin() const { return Nodes.begin(); }