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.
/// 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 {
/// 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(); }