[llvm-commits] CVS: llvm/lib/VMCore/PassManagerT.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Sep 19 21:47:35 PDT 2004
Changes in directory llvm/lib/VMCore:
PassManagerT.h updated: 1.52 -> 1.53
---
Log message:
'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
---
Diffs of the changes: (+5 -5)
Index: llvm/lib/VMCore/PassManagerT.h
diff -u llvm/lib/VMCore/PassManagerT.h:1.52 llvm/lib/VMCore/PassManagerT.h:1.53
--- llvm/lib/VMCore/PassManagerT.h:1.52 Wed Sep 1 17:55:37 2004
+++ llvm/lib/VMCore/PassManagerT.h Sun Sep 19 23:47:24 2004
@@ -726,9 +726,9 @@
//
// This is the top level PassManager implementation that holds generic passes.
//
-template<> struct PassManagerTraits<Module> : public Pass {
+template<> struct PassManagerTraits<Module> : public ModulePass {
// PassClass - The type of passes tracked by this PassManager
- typedef Pass PassClass;
+ typedef ModulePass PassClass;
// SubPassClass - The types of classes that should be collated together
typedef FunctionPass SubPassClass;
@@ -740,15 +740,15 @@
typedef AnalysisResolver ParentClass;
// runPass - Specify how the pass should be run on the UnitType
- static bool runPass(PassClass *P, Module *M) { return P->run(*M); }
+ static bool runPass(PassClass *P, Module *M) { return P->runOnModule(*M); }
// getPMName() - Return the name of the unit the PassManager operates on for
// debugging.
const char *getPMName() const { return "Module"; }
virtual const char *getPassName() const { return "Module Pass Manager"; }
- // run - Implement the PassManager interface...
- bool run(Module &M) {
+ // runOnModule - Implement the PassManager interface.
+ bool runOnModule(Module &M) {
return ((PassManagerT<Module>*)this)->runOnUnit(&M);
}
};
More information about the llvm-commits
mailing list