remove DebugLoc from MCInst and eliminate "Comment printing" from
[oota-llvm.git] / include / llvm / CallGraphSCCPass.h
index 8d5d7c3edfb853a2602f11782188237717d1a738..fc9feda5bd8c26422aa64c002bed24e218279982 100644 (file)
@@ -38,7 +38,6 @@ struct CallGraphSCCPass : public Pass {
   /// doInitialization - This method is called before the SCC's of the program
   /// has been processed, allowing the pass to do initialization as necessary.
   virtual bool doInitialization(CallGraph &CG) {
-    Context = &CG.getModule().getContext();
     return false;
   }
 
@@ -47,7 +46,10 @@ struct CallGraphSCCPass : public Pass {
   /// non-recursive (or only self-recursive) functions will have an SCC size of
   /// 1, where recursive portions of the call graph will have SCC size > 1.
   ///
-  virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC) = 0;
+  /// SCC passes that add or delete functions to the SCC are required to update
+  /// the SCC list, otherwise stale pointers may be dereferenced.
+  ///
+  virtual bool runOnSCC(std::vector<CallGraphNode *> &SCC) = 0;
 
   /// doFinalization - This method is called after the SCC's of the program has
   /// been processed, allowing the pass to do final cleanup as necessary.