namespace llvm {
class TargetMachine;
+class LLVMContext;
//===---------------------------------------------------------------------------
/// PassInfo class - An instance of this class exists for every pass known by
/// the system, and can be obtained from a live Pass by calling its
virtual void passEnumerate(const PassInfo *) {}
};
+//===---------------------------------------------------------------------------
+/// PassRunListener class - This class is meant to be derived from by
+/// clients that are interested in which and when passes are run at runtime.
+struct PassRunListener {
+ /// PassRunListener ctor - Add the current object to the list of
+ /// PassRunListeners...
+ PassRunListener(LLVMContext *);
+
+ virtual ~PassRunListener();
+
+ /// Callback function - This functions is invoked whenever a pass has run.
+ virtual void passRun(LLVMContext *, Pass *, Module *, Function *,
+ BasicBlock *) {}
+};
+
} // End llvm namespace