summaryrefslogtreecommitdiff
path: root/include/llvm/Pass.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Pass.h')
-rw-r--r--include/llvm/Pass.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index cd651db1f1..4f701d85ca 100644
--- a/include/llvm/Pass.h
+++ b/include/llvm/Pass.h
@@ -227,10 +227,20 @@ public:
/// createPrinterPass - Get a module printer pass.
Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
+ /// doInitialization - Virtual method overridden by subclasses to do
+ /// any necessary initialization.
+ ///
+ virtual bool doInitialization(void) { return false; }
+
/// runOnModule - Virtual method overriden by subclasses to process the module
/// being operated on.
virtual bool runOnModule(Module &M) = 0;
+ /// doFinalization - Virtual method overriden by subclasses to do any post
+ /// processing needed after all passes have run.
+ ///
+ virtual bool doFinalization(void) { return false; }
+
virtual void assignPassManager(PMStack &PMS,
PassManagerType T);