Move a few more convenience factory functions from Constant to LLVMContext.
[oota-llvm.git] / include / llvm / PassManagers.h
index 6e4f94697b99ff540137840f68cff9344be98216..1aa0d3a6fa427cc64114ea9d4db5ac428d06cff8 100644 (file)
@@ -114,18 +114,19 @@ enum PassDebuggingString {
   ON_CG_MSG // "' on Call Graph ...\n'"
 };  
 
-/// PassManagerPrettyStackEntry - This is used 
+/// PassManagerPrettyStackEntry - This is used to print informative information
+/// about what pass is running when/if a stack trace is generated.
 class PassManagerPrettyStackEntry : public PrettyStackTraceEntry {
   Pass *P;
   Value *V;
   Module *M;
 public:
   PassManagerPrettyStackEntry(Pass *p)
-    : P(p) {}  // When P is releaseMemory'd.
+    : P(p), V(0), M(0) {}  // When P is releaseMemory'd.
   PassManagerPrettyStackEntry(Pass *p, Value &v)
     : P(p), V(&v), M(0) {} // When P is run on V
   PassManagerPrettyStackEntry(Pass *p, Module &m)
-    : P(p), V(0), M(&m) {}// When P is run on M
+    : P(p), V(0), M(&m) {} // When P is run on M
   
   /// print - Emit information about this stack frame to OS.
   virtual void print(raw_ostream &OS) const;
@@ -413,6 +414,9 @@ public:
   /// whether any of the passes modifies the module, and if so, return true.
   bool runOnFunction(Function &F);
   bool runOnModule(Module &M);
+  
+  /// cleanup - After running all passes, clean up pass manager cache.
+  void cleanup();
 
   /// doInitialization - Run all of the initializers for the function passes.
   ///